ASP.NET - Folder open in - Asked By Priya S on 13-Jun-09 02:46 AM


System.Diagnostics.Process.Start("Explorer.exe", CType(sender, LinkButton).Attributes("path"))

this code use for Open Folder working in xp  but i cannot open in 2008 server. 

Any idea pls

Thank you

Re - Ravenet Rasaiyah replied to Priya S on 13-Jun-09 03:35 AM


Check web page rights you have set followings rights

1. Check in  IIS server you have set executable scripts
2. add  Network service to Web application folder.

3.Open the task managed and check is explorer exe running in background.

thank you

RE - Priya S replied to Ravenet Rasaiyah on 13-Jun-09 05:18 AM


how to add Network service to Web application folder.
What does it mean?

Thank you,

cool - Ravenet Rasaiyah replied to Priya S on 13-Jun-09 05:24 AM

Right click  on your web application folder then select the properties and go the security tab .

Then click add Button to add new user account to your web applications,.

in that window type "NETWORK SERVICES" then  click on and check  all check box in security window.

Check here more details

thank you
Re - Priya S replied to Ravenet Rasaiyah on 13-Jun-09 06:56 AM

I put the NETWORK SERVICES. but cannot work.

and i try this function and then I have shared the folder. but no use.

Protected Sub lnkExplorer_Open(ByVal sender As Object, ByVal e As System.EventArgs)

Dim conpath As String = ConfigurationManager.AppSettings("IPAddress")

Dim s As String = Request.ServerVariables("server_name")

Dim path As String = CType(sender, LinkButton).Attributes("path")

path = "\\" & s & path.Substring(path.IndexOf(":") + 1)

System.Diagnostics.Process.Start("Explorer.exe", path)

End Sub

I get "c:\downloadedfiles\xx" in the  CType(sender, LinkButton).Attributes("path"), but no use also i change the ip address \\\downloadedfiles\xx.  but i can open folder when browser by source. cannot open by IIS

Thank you

This does not make any sense. - Peter Bromberg replied to Priya S on 13-Jun-09 08:15 PM

Even if it works, it would only work for the local machine. If this is supposed to be a web site that is deployed to a webserver, it would open a folder on the web server where nobody is even logged on to see it.