views:

13

answers:

1

We have an intranet production server running in a virtual environment, which we cloned to make a development server. The computer name and IP are changed and everything is running fine. There is a shared folder on the production instance, which we reference from the development server because everything is readonly. I can visit the share from my local machine, from the development machine and from practically any machine on our network. When I debug my local version of the intranet, it connects to the production folder just fine. When I try to access the folder from my ASP.NET application on the development server, it gives me UnathorizedAccessException. I have given Everyone read access on both the sharing and the security tabs, and still I cannot access the folder.

Another part of our website connects to a folder on a third server. The development environment has no problem connecting to that. I changed the folder to the copy of the production folder on the development machine and it works just fine, but I would like it to point to the production machine anyway. I don't understand what is happening. How is it that I can share a folder to everyone and yet the development website cannot access it?

A: 

Is your ASP.NET worker process running as a low privilege account? If so you need to ensure that the account has access to the folder and that the access doesnt require privilege elevation if the machine is Win 2K8/Win 7.

Are you running IIS7? If so have you tried turning on diagnostic tracing, failed request tracing and verified that the "advanced settings > Test" is able to access the folder specified?

GrayWizardx
We are using Windows Server 2003, which I think is IIS7. I don't know exactly how to do what you're suggesting. Can you explain it a bit more or link me to an article about how to do this?
NickLarsen
It is running as `NetworkService`. I have double checked that the folder shares read privileges to `Everyone`.
NickLarsen
@Nick not sure if Win 2K3 is IIS7, I think it could be either actually. If it is IIS7 when you open up IIS Manager you should see a panel of icons on the right broken into three groups. The middle group will have a "Failed Request Logging" icon, and if the module is installed a "diagnostic" logging as well. Also in the event viewer you should have events for ASP.NET that will give you better tracking info. To get to the "test", right click on the virtual folder and select "advanced settings" and click test. It might be under "basic" setup dont have a console handy. Sorry.
GrayWizardx