Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS error The server may not be configured for access to the requested URL

I have the following setup:

  1. windows server 2012
  2. visual developer 2012
  3. IIS 7. I have changed the authentication type on my web config file from form to windows as follow:-

But when I try to access the ASP.NET MVC site the got the following error:-

Server Error in '/' Application.

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.


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

What could be the problem?

like image 961
John Peter Avatar asked Jan 04 '13 21:01

John Peter


1 Answers

Please change the Web.config file

From

<system.web>
<authorization>
      <deny users="?" />
    </authorization>
</system.web>

To

<system.web>
    <authorization>    
        <allow users="*" />
    </authorization>    
</system.web>

Also Web.config for 2 users

<system.web>
    <authorization>
      <allow users="DOMAIN_NAME\my_name,DOMAIN_NAME\USER_NAME" />
      <deny users="*" />
    </authorization>
 </system.web>
like image 195
Shibu Thomas Avatar answered Oct 11 '22 08:10

Shibu Thomas