In my code I want to thanks to the good path, open the file Index.html in my IIS server.
I am actually using this :
string path = "C://inetpub//wwwroot//Files//Wireframes//" + ((LinkButton)sender).ID;
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(path);
System.IO.FileInfo[] fiArr = di.GetFiles("*", SearchOption.TopDirectoryOnly);
foreach (System.IO.FileInfo thefile in fiArr)
{
if (thefile.Name == "index.html")
{
System.Diagnostics.Process.Start(path + "/index.html");
}
}
}
I am wondering why It is working in local, but when I put my project on my server, this is not doing anything.
Because:
.htmlextensionAlso, instead of searching for
*search forindex.htmlinGetFiles.Make sure that you understand that you are creating a new process on the machine which hosts your web site and not on machine that is running your browser. You want be able to navigate to a page on hosted on machine B from machine A and have a new browser window opened on machine A from machine B.