views:

19

answers:

1

My web app (asp VB 2005) uses Windows authentication. If the user isn't part of a specific AD security group they don't get to edit the data; instead I redirect the user to a read-only page.

The program works fine in the IDE.

I published the web app to my laptop and Disabled anonymous access. When I ran the program I got redirected to the read-only page. I added a write event to the application event log to see what was going on, and found that the WindowsPrincipal.Identity.Name contained my laptop's ID, not my user name.

I reassert: anonymous access is disabled in IIS and the web.config file has Windows Authentication.

Can anyone suggest what else to check? Or can you explain what's going on?

+1  A: 

You probably need to set <identity impersonate="true" /> in your web.config:

<configuration>
   <system.web>
      <identity impersonate="true" />

See http://msdn.microsoft.com/en-us/library/72wdk8cc.aspx for more details.

Guido Domenici
That's what I was going to suggest, but you beat me to it ;-)
camainc
Thank you both. I actually discovered this last night so I beat you to it :) Thanks for the link!Can someone explain why the "impersonate" setting isn't automatically added to the web.config file?
Melody Friedenthal