3

I had the problem of HttpContext.Current.User.Identity.Name coming through in my ASP.NET application as an empty string and found these references to resolve the issues;

HttpContext.Current.User.Identity.Name is Empty (which also took me to Scott Guthrie's blog.

I've disabled anonymous authentication and enabled windows authentication. I now get the domain user name. However the problem now is that I get the windows credentials prompt box prior to someone accessing my application. This was not how I intended for it to work.

Is there another setting that I can implement to get the domain creds of the currently logged in user without having to force the windows authentication prompt on my users?

Our ASP.NET application is pretty simple and takes this information, passing it onto a Silverlight application.

Community
  • 1
  • 1
GT.
  • 545
  • 1
  • 8
  • 18

1 Answers1

2

You should get the credentials directly in IE and chrome. They pass the NTLM credentials directly.

If this doesn't work for you, place the web site in "Local Intranet" security group in Windows "Internet options".

Firefox is known to prompt for these by default. It does have a setting to enable it. But you would have to reply on a plugin if you want it to work without users have to go through their config.

nunespascal
  • 17,584
  • 2
  • 43
  • 46