Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

docmd.close 2585, WWWXXXAPC, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text, how to setup procmail html2text, WWWXXXAPC., XXXCNZZZ

Links

XODOX
Impressum

#1: Access to the folder is denied

Posted on 2008-04-23 21:46:25 by 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()

Report this message

#2: Re: Access to the folder is denied

Posted on 2008-04-23 23:45:19 by lexa

On Apr 23, 9:46=A0pm, "David C" <dlch...@lifetimeinc.com> wrote:
> I have a virtual folder on a web site that links to a shared folder on a 2=
nd
> server. =A0When I try to access it in my aspx page I get the following err=
or:
>
> 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. =A0I 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. =A0If I physic=
ally
> type the file path into the browser, it displays the files in that folder.=

> Can anyone help? =A0Thanks.
>
> David
>
> =A0 =A0 =A0 =A0 =A0 =A0 strFolderName =3D "Hamelin, Jose"
> =A0 =A0 =A0 =A0 =A0 =A0 'Get information about the files in the specified =
folder
> =A0 =A0 =A0 =A0 =A0 =A0 Dim virtualFolderPath As String =3D "Photos/" &
> strFolderName.ToString & "/RO25201"
> =A0 =A0 =A0 =A0 =A0 =A0 Dim folder As New
> DirectoryInfo(Server.MapPath(virtualFolderPath))
>
> =A0 =A0 =A0 =A0 =A0 =A0 Dim fileList As FileInfo() =3D folder.GetFiles("In=
itial*.jpg")
> =A0 =A0 =A0 =A0 =A0 =A0 PicturesInFolder.DataSource =3D fileList
> =A0 =A0 =A0 =A0 =A0 =A0 PicturesInFolder.DataBind()

http://groups.google.com/group/microsoft.public.dotnet.frame work.aspnet/brow=
se_thread/thread/ec9a28d4bb655c14/cf3ed675b1609854

Report this message