I am having the text file name ipaddress.txt which is used to list all the IP address in the network.
There are 3 functions for doing that.
1.runcmd()---> Function is used to track all the IP Addres in the network using the DOS Command(FOR /L %i IN (1,1,254) DO ping -n 1 172.29.116.%i | FIND /i ""Reply"">> c:\ipaddresses.txt).Approximately it will take 15 minutes to complete the list.
2.txtReplace()-->Function is used to repleace the text file content with only ip address.
3.checkIPAddress()-->function is used to check my ipaddress values in the XML file with text file if does not exists alarm will come.
My problem
~~~~~~~~~
In the button click i am running all the 3 functions in the below order
sathis_asp
Member
224 Points
149 Posts
Shared file problem
Mar 21, 2011 11:34 AM|LINK
I am having the text file name ipaddress.txt which is used to list all the IP address in the network.
There are 3 functions for doing that.
1.runcmd()---> Function is used to track all the IP Addres in the network using the DOS Command(FOR /L %i IN (1,1,254) DO ping -n 1 172.29.116.%i | FIND /i ""Reply"">> c:\ipaddresses.txt).Approximately it will take 15 minutes to complete the list.
2.txtReplace()-->Function is used to repleace the text file content with only ip address.
3.checkIPAddress()-->function is used to check my ipaddress values in the XML file with text file if does not exists alarm will come.
My problem
~~~~~~~~~
In the button click i am running all the 3 functions in the below order
protected void Button1_Click(object sender, EventArgs e)
{
runcmd();
txtReplace();
checkIPAddress();
}
I already mentioned that the runcmd() function will run more that 15 minutes in the back ground process but before that the 2 functions
1.txtReplace();
2.checkIPAddress();
are calling in the c# since there is a error says that the process is already being used.
Please let me know how to call the two functions txtReplace(); and checkIPAddress(); after completing the back ground process of the function
runcmd()
sathis_asp
Member
224 Points
149 Posts
Re: Shared file problem
Mar 22, 2011 10:27 AM|LINK
Hi please find the answer for the below question
protected void Button1_Click(object sender, EventArgs e)
{
runcmd();
Thread.Sleep(900000);
txtReplace();
checkIPAddress();
}