简体   繁体   English

拒绝访问IIS服务器问题

[英]access is denied IIS server problem

i have no problem compiling and viewing my asp.net application using visual studio 2008 我使用Visual Studio 2008编译和查看我的asp.net应用程序没有问题

but when i try to see it the IIS server (asp.net 4.0...) 但是当我尝试查看它时,IIS服务器(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: 我试图将框架切换到2.0 ,但是也失败了,但是我收到了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. 任何指导将不胜感激。

Are you using Windows Authentication? 您正在使用Windows身份验证吗? 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. 验证它已在IIS中启用。

确保NETWORK SERVICE帐户(或您正在使用的任何系统帐户)具有对该文件夹的权限。

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" 确保启用对虚拟目录的匿名访问,并且如果您在站点上使用Windows身份验证,则还请选中“集成Windows身份验证”选项

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 将IIS_IUSRS添加到IIS中的权限:右键单击您的项目>>编辑权限>>安全>>添加>>键入IIS_IUSRS >>确定
  2. In your IIS features view >> Authentication >> Enable Windows Authentication and if you want, Basic Authentication. 在您的IIS功能视图中>> >>身份验证>>启用Windows身份验证,如果需要,请启用基本身份验证。
  3. Relaunch your App, and you should be OK 重新启动您的应用,一切正常

The error seems clear, you don't have the privileges needed. 错误似乎很明显,您没有所需的特权。

Try running VS as Admin. 尝试以管理员身份运行VS。

If you're in a company network and you can't 'elevate' enough, there is the new IIS Express to address just that problem. 如果您在公司网络中,而又不能“提升”足够的空间,则可以使用新的IIS Express来解决该问题。

Permissions could definitely be a problem. 权限肯定是一个问题。

But are you sure you deployed your ASP.Net application correctly? 但是您确定正确部署了ASP.Net应用程序吗?

The easiest, surest way is to use the "Publish Web" tool from Visual Studio: 最简单,最可靠的方法是使用Visual Studio中的“发布Web”工具:

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

You can try change folder permissions: 您可以尝试更改文件夹权限:

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

I tried a bunch of solutions but the final stroke was enabling Windows Authentication. 我尝试了很多解决方案,但最后的尝试是启用Windows身份验证。 My website was set to log in the user automatically based on their windows account. 我的网站设置为根据用户的Windows帐户自动登录。

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 您需要首先安装该功能,然后在IIS中为您的站点启用它: https : //www.iis.net/configreference/system.webserver/security/authentication/windowsauthentication

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM