IIS 7 virtual directory on network share access denied

iisiis-7network-sharevirtual-directorywindows-server-2008

I have a loadbalanced web server where I'm trying to setup a virtual directory on one server (server02) to a network share on the other server (server01). Both servers are IIS 7 on Windows 2008R2. They are not part of a domain.

I setup the virtual directory on server02 connecting to the network share as an administrator of server01 (for testing purposes).

In IIS, I can browse the files that are in the virtual directory. When I click "Test Settings" in the virtual directory basic settings there are no errors and the virtual directory can connect to the share without problems.

However, when I'm trying to request a file (http://server02/media/image.jpg) through the virtual directory I get this configuration error "An error occurred loading a configuration file: Failed to start monitoring changes to '\\server01\media' because access is denied.".

I have no idea what causes this because according to IIS the connection is ok.

Best Answer

The user account that your site's application pool is running as needs to have permission to that share. Change that to an account with rights to that share and you should be fine.

Also, whats the point of load balancing your web servers if you're going to have server01 be a single point of failure? You should replicate that data or cluster the web servers with shared storage instead. What you're trying to do is not a very good idea.