0

Is there a way to bypass or intercept the "Authentication Required" dialog in C# so that it automatically authenticates the user on an intranet site? The dialog I'm referring to is the one indicated below:

enter image description here

At present I've created a new ASP.NET MVC 4 intranet site and have no idea how to stop this dialog from popping up using C# code.

Cheers,

Tim

Rand Random
  • 7,300
  • 10
  • 40
  • 88
Tim Kruger
  • 863
  • 2
  • 10
  • 26
  • For Chrome, refer [this answer](https://stackoverflow.com/questions/7800938/how-to-enable-auto-logon-user-authentication-for-google-chrome) –  Nov 17 '17 at 09:39

1 Answers1

0

To bypass do this:

  1. Select project in solution explorer
  2. Right click and go to properties (or press F4)
  3. Set Allow anonymous access to enabled (enabled, allow or whatever the option was).

The problems originates to not having the site added to intranet. You can do that too but the above makes everything easier. Anyway:

Chrome: Chrome > Options > Under the Hood > Change Proxy Settings > Security (tab) > Local Intranet/Sites > Advanced.

IE: This

Firefox: This

Liquid Core
  • 1
  • 6
  • 27
  • 52
  • Hi Liquid Core I set the "Anonymous Authentication" for the project to "Enabled" as you suggested but it still asks me for authentication when running the project :-|. – Tim Kruger Nov 17 '17 at 09:50
  • @TimothyKruger then try to add the site to the intranet. – Liquid Core Nov 17 '17 at 10:03
  • @TimothyKruger try also this: Disable anonymous access and just use 'Integrated Windows Authentication' In Internet Explorer go to Tools -> Internet Option -> Security -> Custom Level -> Scroll the bottom and select "Automatic Login with current user name and password”. – Liquid Core Nov 17 '17 at 10:09
  • thanks very much for your answer and comments, but the reason for my original post was to try and avoid making browser specific changes. But alas it seems like I'll just have to do this after all :-(. – Tim Kruger Nov 17 '17 at 10:13