1

On a MVC 5 application, I have this in the Web.config:

<system.web>
    <compilation debug="true" targetFramework="4.6.1" />
    <httpRuntime targetFramework="4.6.1" />
    <authentication mode="Windows" />
    <authorization>
        <deny users="?" />
        <allow users="<list of authorized users>" />
    </authorization>
</system.web>

The application correctly authenticates users from the specified list, but my issue is that it asks every single time that the page is refreshed, or navigated to. I want it to ask once and then remember the user as they navigate between pages on the application. How might I accomplish this?

Tim Morris
  • 385
  • 1
  • 3
  • 11

1 Answers1

3

As far as I know, storing memebr in for windows authentication is not related with the IIS setting. This is related with the Browser setting. I guess you may disable the auto submission of windows credentials by browsers.

For IE or Chrome(Chrome browser uses system settings which are managed using Internet Explorer):

Notice: You should add the url in the intranet as below image shows:

enter image description here

1.Navigate through Menu bar to Tools -> Internet Options -> Security

2.Select Local Intranet and Click on "Custom Level" button

3.Scroll to bottom of the window to User Authentication section, select "automatic logon only in intranet zone"

enter image description here

For firefox:

1.Start Firefox

2.In the address bar, type about:config. At the prompt that warns to proceed with caution, agree to continue.

3.After the config page loads, in the filter box type: network.automatic. You should see a search result of network.automatic-ntlm-auth.trusted-uris

4.Modify network.automatic-ntlm-auth.trusted-uris by double-clicking the row, and then enter https://your_SecureAuth_FQDN.com; Multiple sites can be added by comma delimiting them, as in this example: https://your_SecureAuth_FQDN.com, https://www.replacewithyourintranetsite.com

5.Click "OK" and close Firefox

Brando Zhang
  • 22,586
  • 6
  • 37
  • 65