views:

1176

answers:

2

IIS5 is running on SERVER1.

One of the virtual directories in IIS, myfiles, is pointing to "A shared location on another computer", //SERVER2/myfilesshare

When I try to access the page: http://SERVER1/myfiles

... I get the error:

You are not authorized to view this page

HTTP 401.1 - Unauthorized: Logon Failed

Internet Information Services

I have triple-checked the "Connect As..." settings in IIS. The credentials I'm using to access the share are correct-- they work when connect to the share in Windows Explorer, but not through the IIS virtual directory. I've tried granting full permission to Everyone on the folder in SERVER2, but no luck.

Any thoughts?

A: 

try enabling windows authentication on the virtual directory security tab (in IIS).

Dror
That causes a username/password prompt to pop up when I access the site. However, even if I then enter the correct credentials it doesn't work.Note the two servers are not part of the same domain.
frankadelic
+2  A: 

Permission issues can be tricky. Try running filemon on the 'other computer' It can be downloaded over here: http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx (it's not a big application just a tiny lightweight tool)

After you've started filemon, stop the monitor process (I believe it's turned on by default when you start the application), clear the logged data, create a filter for the folder you have trouble getting access to. Start the monitor process. Request your webpage. Stop the monitor process and look for "access denied" messages in filemon. When found, filemon will also mention the name of the actual user which is trying to get access. This might help you to get to a solution.

Btw when using Windows Server 2008 you will need processmon instead: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Roel Snetselaar
For some reason, filemon isn't showing anything relevant to that file on the shared machine. Event Viewer revealed that ASPNET did not have permissions on the web.config file on the network share. How can I give the local ASPNET user on server1 access to server2?
frankadelic
Well, can you also create an ASPNET account on that server and assign relevant permissions? Also you may try to run ASP.NET application under a domain account.
Lex Li