473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Access to the folder is denied

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()
Jun 27 '08 #1
1 1040
On Apr 23, 9:46*pm, "David C" <dlch...@lifetimeinc.comwrote:
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/micro...3ed675b1609854
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: RichB | last post by:
Hello, The .NET application I have just installed at a client web site is throwing a strange error. At first the applications works without any problems, but after 10 mins or so Access denied...
6
by: Guoqi Zheng | last post by:
Sir, Some times, I developed class library to use on other sites. When I am testing the application, I often get an error of access is denied to that assembly. How can I check the problem? ...
8
by: James | last post by:
I developed a small data-entry ASP.NET app on my workstation (WinXP Pro). It connects to a SQL Server 2000 DB using integrated security. This is located on a server, SERVER1. SERVER1 is also our...
11
by: James Goodman | last post by:
Ok, I had an ASP.NET application which after much trouble worked on a server, SERVER1. I need to move this application to another server, DC2. Both are domain controllers, both are running the...
2
by: HNguyen | last post by:
Hi all, I have a problem with the access to the folder for uploading the file into that folder by using ASP.NET program. The error message was : "Access is denied ..." to the location I save...
1
by: amit.vasu | last post by:
Hi I have created a web serivces using .net framework 2.0. When I try to execute the web service I get the following error. Failed to start monitoring changes to 'e:\Default Web Site' because...
0
by: royan | last post by:
Help please! I have the same problem which this post ...
0
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I'm using System.Web.Mail to compose and send a message. I'm receiving an "Access is denied" error message when non-Domain Administrators attach files to the MailMessage. My allows users...
1
by: daraboy | last post by:
I have a Web home page which allows the IIS users account IUSR_Svr01 to view the page. Each link on the home page allows access to a sub folder, the access to the sub folder is restricted by the...
1
by: JordanRieger | last post by:
Here is a nasty issue that has been giving me grief for the last couple days. This requires good knowledge of IIS, MSXML, and Windows/NTFS permissions. We have an existing ASP (VBScript) app...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.