One web site is required to be accessed by me (developer) and one user (DOMAIN_NAME\USER_NAME).
When I developed web site in visual studio using "automatic host" created by VS, the following settings in web.config were enough:
<authentication mode="Windows"/> <authorization> <allow users="DOMAIN_NAME\my_name,DOMAIN_NAME\USER_NAME" /> <deny users="*" /> </authorization>
But when I created web site in IIS I'm receiving error:
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.
What setting for ApplicationPoolIdentity and web site itself are required to be specified?
Thanks a lot!
EDIT:
I've configured Application Pool of local IIS to use 'LocalSystem' identity, web site - to use "pass-through" authentication, and as suggested disabled "Anonymous Authentication", enabled "Windows Authentication" - and web site locally became workable.
But locally I have windows 7 (IIS7), but on "TEST" environment (where I need to deploy web site) I have windows 2008 server and it doesn't have option to enable "Windows Authentication"... don't know why... probably that is for higher level of administrator, but I'm a member of Administrators group...
Guess, I'm doing something wrong...
Please advise.
A configuration file (web. config) is used to manage various settings that define a website. The settings are stored in XML files that are separate from your application code. In this way you can configure settings independently from your code. Generally a website contains a single Web.
A web. config file is a Windows file that lets you customize the way your site or a specific directory on your site behaves. For example, if you place a web. config file in your root directory, it will affect your entire site (www.coolexample.com).
The web. config is a file that is read by IIS and the ASP.NET Core Module to configure an app hosted with IIS.
Your web.config is set up properly. Further, ensure the IIS site/app is configured as:
IIS7
IIS6
Find the dialog below at
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