Alex Gordon
Alex Gordon

Reputation: 60691

access is denied IIS server problem

i have no problem compiling and viewing my asp.net application using visual studio 2008

but when i try to see it the IIS server (asp.net 4.0...)

i get this message:

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.1

i did already run this update:

asp_net_regiis.exe

is there something else that i should configure?

i've tried to switch the framework to 2.0 and that failed as well however i got a different message for 2.0:

Server Application Unavailable

The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

any guidance would be most appreciated.

Upvotes: 2

Views: 28031

Answers (8)

Yusuf Ganiyu
Yusuf Ganiyu

Reputation: 1087

I had the same error and this was how I resolved it:

  1. Add IIS_IUSRS to the permission in IIS: Right click your project >> edit permission >> security >> Add >> Type IIS_IUSRS >> OK
  2. In your IIS features view >> Authentication >> Enable Windows Authentication and if you want, Basic Authentication.
  3. Relaunch your App, and you should be OK

Upvotes: 2

Wario X
Wario X

Reputation: 213

I tried a bunch of solutions but the final stroke was enabling Windows Authentication. My website was set to log in the user automatically based on their windows account.

You need to first install that capability and then enable it for your site in IIS: https://www.iis.net/configreference/system.webserver/security/authentication/windowsauthentication

Upvotes: 0

no81no
no81no

Reputation: 151

You can try change folder permissions:

right click on the folder -> 
properties -> 
security tab -> 
edit -> 
add permissions to IIS user

Upvotes: 1

paulsm4
paulsm4

Reputation: 121599

Permissions could definitely be a problem.

But are you sure you deployed your ASP.Net application correctly?

The easiest, surest way is to use the "Publish Web" tool from Visual Studio:

http://msdn.microsoft.com/en-us/library/aa983453.aspx

Upvotes: 1

James Johnson
James Johnson

Reputation: 46047

Make sure that the NETWORK SERVICE account (or whatever system account you're using) has permissions to that folder.

Upvotes: 3

Icarus
Icarus

Reputation: 63956

You have authentication issues. Make sure that you enable anonymous access to your virtual directory and if you are using windows authentication on your site, that you also check off the option for "integrated windows authentication"

Upvotes: 2

Ryan Rinaldi
Ryan Rinaldi

Reputation: 4239

Are you using Windows Authentication? Verify that your user account has access to the folder the web site is in.

Are you using Anonymous Authentication? Verify that it's enabled in IIS.

Upvotes: 3

Henk Holterman
Henk Holterman

Reputation: 273179

The error seems clear, you don't have the privileges needed.

Try running VS as Admin.

If you're in a company network and you can't 'elevate' enough, there is the new IIS Express to address just that problem.

Upvotes: 1

Related Questions