Access to the folder is denied

D

David C

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\photos\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 virtualFolderPath As String = "Photos/" &
strFolderName.ToString & "/RO25201"
Dim folder As New
DirectoryInfo(Server.MapPath(virtualFolderPath))

Dim fileList As FileInfo() = folder.GetFiles("Initial*.jpg")
PicturesInFolder.DataSource = fileList
PicturesInFolder.DataBind()
 
G

Guest

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\photos\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 virtualFolderPath As String = "Photos/" &
strFolderName.ToString & "/RO25201"
            Dim folder As New
DirectoryInfo(Server.MapPath(virtualFolderPath))

            Dim fileList As FileInfo() = folder.GetFiles("Initial*.jpg")
            PicturesInFolder.DataSource = fileList
            PicturesInFolder.DataBind()

http://groups.google.com/group/micr...read/thread/ec9a28d4bb655c14/cf3ed675b1609854
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top