views:

43

answers:

1

I have an Intranet site reading the windows user name and using it for authentication in the website.

My code works locally but does not read the login name when hosted using IIS 6 on Windows Server 2003 with anonymous access checked. If I un-check anonymous access then in Firefox I keep getting a pop up for username and password which never ends. In IIS 6 it is set to framework 4 and has its own application pool.

User.Identity.Name -returns blank on the server but works fine locally

web.config: <authentication mode="Windows"/> <identity impersonate="true"/>

I have an older 3.5 webforms site that works fine on the same server..

A: 

Look at the Windows account assigned to run the app pool. Does it have authorization to your .Net application?

To use Windows auth, you'll want to un-check anonymous access.

Either remove the impersonate attribute, or set it to false (the default).

You can set the app pool to use the Network Service account and then grant the Network Service account read/write authorization to your MVC folder.

AndrewDotHay