3

If I have the following line in my web.config file...

<identity impersonate = "true" />

And the IIS7 site is set to use anonymous authentication

(Notice I am not specifying a specifc user in the web config)

What user will IIS7 use to service the request, and what effect will this have? There is debate with my co-workers as to whether the user which is entered into the "Connect As" dialogue is used by IIS.

Yuck
  • 49,664
  • 13
  • 105
  • 135
user772110
  • 411
  • 4
  • 11

3 Answers3

0

You can solve the debate by showing this on a page, but I am pretty sure Anonymous is going to be the answer:

Response.Write(System.Web.HttpContext.Current.User.Identity.Name);
rick schott
  • 21,012
  • 5
  • 52
  • 81
0

No it will not. There is a separate section for that. Here is a link that defines how you set the impersonation user. Link

Etch
  • 3,044
  • 25
  • 31
0

Based on your website setting System.Web.HttpContext.Current.User.Identity.Name will return an empty string. In short all the users will be anonymous even if you have set impersonation=true

Amit Rai Sharma
  • 4,015
  • 1
  • 28
  • 35