I have a virtual folder on a web site that links to a shared folder on a 2nd
server. When I try to access it in my aspx page I get the following error:
Access to the path '\\server\photo s\Hamelin, Jose\RO25201' is denied.
I gave the photos folder access from network service, anonymous, etc. and
still no luck. I even tried the "Connect as..." button in the IIS
properties but that did not work either.
Below is the aspx code and it fails on the GetFiles method. If I physically
type the file path into the browser, it displays the files in that folder.
Can anyone help? Thanks.
David
strFolderName = "Hamelin, Jose"
'Get information about the files in the specified folder
Dim virtualFolderPa th As String = "Photos/" &
strFolderName.T oString & "/RO25201"
Dim folder As New
DirectoryInfo(S erver.MapPath(v irtualFolderPat h))
Dim fileList As FileInfo() = folder.GetFiles ("Initial*.jpg" )
PicturesInFolde r.DataSource = fileList
PicturesInFolde r.DataBind()
server. When I try to access it in my aspx page I get the following error:
Access to the path '\\server\photo s\Hamelin, Jose\RO25201' is denied.
I gave the photos folder access from network service, anonymous, etc. and
still no luck. I even tried the "Connect as..." button in the IIS
properties but that did not work either.
Below is the aspx code and it fails on the GetFiles method. If I physically
type the file path into the browser, it displays the files in that folder.
Can anyone help? Thanks.
David
strFolderName = "Hamelin, Jose"
'Get information about the files in the specified folder
Dim virtualFolderPa th As String = "Photos/" &
strFolderName.T oString & "/RO25201"
Dim folder As New
DirectoryInfo(S erver.MapPath(v irtualFolderPat h))
Dim fileList As FileInfo() = folder.GetFiles ("Initial*.jpg" )
PicturesInFolde r.DataSource = fileList
PicturesInFolde r.DataBind()
Comment