I'm trying to enable Windows Authentication to develop locally, as per the title:
Via the project properties, I've set Windows Authentication to enabled and Anonymous Authentication to disabled.
In the web.config I've set:
<authentication mode="Windows" />
However, when running the site I'm continually prompted for credentials. Entering Windows 8 or local account credentials don't seem to make any difference and I've set those accounts to have full permissions on the folder.
Any suggestions gratefully received!
UPDATE 1: As suggested by Darin Dimitrov I created a blank MVC project and selected the Intranet template. After setting Anonymous Authorisation to disabled and Windows Authentication enabled this test project worked exactly as expected (prompts for credentials when entered provides access to site). I applied the same authorisation config to my Orchard projects web.config:
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
But still no joy, I'm prompted for credentials as expected but nothing I enter seems to authorise the user. I've Pastie'd the two web.configs below in case anyone else can point out what I'm missing?
Windows Authentication (also known as Negotiate, Kerberos, or NTLM authentication) can be configured for ASP.NET Core apps hosted with IIS, Kestrel, or HTTP. sys.
Unlike IIS Server, IIS Express doesn't support Windows Authentication by default. You can enable the Windows Authentication in IIS Express by modifying the applicationhost. config under the “C:\Users[username]\Documents\IISExpress\config” directory.
You need to disable the "Anonymous Authentication" and Enable the "Windows Authentication". and right click your application -> Manage Application -> Browse. Here you need to give your windows user name and password. (the credentials you're given when you log in to your machine).
Make sure you have enabled Windows Authentication in the properties of the Web Server and disabled Anonymous authentication:
Also make sure you have read the Text file that was generated for you when you created your new MVC application using the Intranet Template:
In order to use the Intranet template, you'll need to enable Windows authentication and disable Anonymous authentication.
IIS 7 & IIS 8
- Open IIS Manager and navigate to your website.
- In Features View, double-click Authentication.
On the Authentication page, select Windows authentication. If Windows authentication is not an option, you'll need to make sure Windows authentication is installed on the server.
To enable Windows authentication on Windows:
a) In Control Panel open "Programs and Features".
b) Select "Turn Windows features on or off".
c) Navigate to Internet Information Services > World Wide Web Services > Security and make sure the Windows authentication node is checked.
To enable Windows authentication on Windows Server:
a) In Server Manager, select Web Server (IIS) and click Add Role Services
b) Navigate to Web Server > Security and make sure the Windows authentication node is checked.
In the Actions pane, click Enable to use Windows authentication.
- On the Authentication page, select Anonymous authentication.
- In the Actions pane, click Disable to disable anonymous authentication.
IIS Express
- Click on your project in the Solution Explorer to select the project.
- If the Properties pane is not open, open it (F4).
- In the Properties pane for your project:
a) Set "Anonymous Authentication" to "Disabled".
b) Set "Windows Authentication" to "Enabled".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With