Saturday, February 12, 2011

ASP.NET authentication mode=Forms - so why am I getting a Windows Login prompt?

I have authentication mode set to forms in my asp.net web.config but am still getting a windows login prompt when i browse to the website.

Could authentication mode be set elsewhere, in IIS for example? My site runs on IIS 6.

Thanks.

  • I have had issues where the authentication was set to forms and the directory security was set to allow anonymous, but some resources (images in my particular case) did not have the proper permissions to allow the anonymous user to read them.

    The effect is that the user was prompted to login so that the graphics could be displayed, after which the form was displayed and the user logged in (again) with the intended form.

    From DocMax
  • This could be because the permissions on the folder that is being served is not allowed to be accessed by the user running the web site

    From Andrew Cox
  • Sounds like windows permissions problem.

    Windows permissions will always override anything that you have set up in aspnet.

    I would start by looking at "anonymous access" permissions in IIS admin, then work your way through the file system.

    From seanb
  • You have configured anonymous access in IIS Administrator, but the IIS user does not have permission to access the filesystem, defaulting to the login dialog to authenticate as Windows user.

    From devio
  • As it happens a colleague updated my machine to .NET Framework 3.5 SP1 whilst I was away. So I compiled my project and released onto the server which does not have SP1 installed and the above happened.

    I've installed SP1 on the server and it's working fine now.

    Thanks for all your input.

    Just to clarify : the login popped up because the application was unable to load a file due to the problem described in the following: http://geekswithblogs.net/LessonsLeared/archive/2008/08/21/hidden-surprises-in-.net-3.5-service-pack-1.aspx

    From paulie

0 comments:

Post a Comment