Posted on: 4/1/2011 6:40:59 AM | Views : 850

Hi,
if i run the below code in VS-2005 it's running and creating the ipaddresses.txt file but if i install the same application in the server machine(same machine) the ipaddresses.txt file is not creating.
Please check and advise..
string Path = HttpRuntime.AppDomainAppPath + @"DB\ipaddresses.txt"; Process Proc = new Process(); if (File.Exists(Path)) { File.Delete(Path); } Proc.StartInfo.FileName = "cmd.exe"; Proc.StartInfo.UseShellExecute = false; Proc.StartInfo.RedirectStandardInput = true; Proc.StartInfo.RedirectStandardOutput = true; Proc.Start(); for (int i = 116; i < 117; i++) { string strPingCmd = "FOR /L %i IN (1,1,8) DO ping -n 1 172.29." + i.ToString() + ".%i | FIND /i \"Reply\" >> " + Path + ""; Proc.StandardInput.WriteLi ...

Go to the complete details ...