Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows authentication. User gets prompted - ASP.NET

Tags:

asp.net

I have the following settings:

Web.config

Authentication Mode = "Windows"

Virtual Directory -> Enable anonymous access - UNCHECKED -> Integrated Windows authentication - CHECKED

When a user goes to the default page on the intranet, he gets prompted to enter the user name and password even though he has already been authenticated

**UPDATE: To clarify what I am doing - We have an application that is set to windows authentication = forms - There was a request that for certain servers in the intranet, we would want to bypass the login.aspx page - All that the login.aspx page does is, grabs the windows username, checks the database, gets the forms username and password and lets the user log in - I am using User.Identity.Name to get the windows user name to do a mapping

**

like image 477
DotnetDude Avatar asked Mar 06 '26 06:03

DotnetDude


2 Answers

Did you turn on impersonation?

<identity impersonate="true" />
like image 195
Jon Avatar answered Mar 07 '26 21:03

Jon


Also make sure that when you are viewing the site in Internet Explorer that the zone in the status bar says "Intranet Zone". Otherwise it won't log you in by default.

like image 29
David Avatar answered Mar 07 '26 19:03

David



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!