簡體   English   中英

拒絕訪問IIS服務器問題

[英]access is denied IIS server problem

我使用Visual Studio 2008編譯和查看我的asp.net應用程序沒有問題

但是當我嘗試查看它時,IIS服務器(asp.net 4.0 ...)

我收到此消息:

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

我確實已經運行了此更新:

asp_net_regiis.exe

還有什么我應該配置的嗎?

我試圖將框架切換到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.

任何指導將不勝感激。

您正在使用Windows身份驗證嗎? 驗證您的用戶帳戶是否有權訪問網站所在的文件夾。

您正在使用匿名身份驗證嗎? 驗證它已在IIS中啟用。

確保NETWORK SERVICE帳戶(或您正在使用的任何系統帳戶)具有對該文件夾的權限。

您有身份驗證問題。 確保啟用對虛擬目錄的匿名訪問,並且如果您在站點上使用Windows身份驗證,則還請選中“集成Windows身份驗證”選項

我有同樣的錯誤,這就是我的解決方法:

  1. 將IIS_IUSRS添加到IIS中的權限:右鍵單擊您的項目>>編輯權限>>安全>>添加>>鍵入IIS_IUSRS >>確定
  2. 在您的IIS功能視圖中>> >>身份驗證>>啟用Windows身份驗證,如果需要,請啟用基本身份驗證。
  3. 重新啟動您的應用,一切正常

錯誤似乎很明顯,您沒有所需的特權。

嘗試以管理員身份運行VS。

如果您在公司網絡中,而又不能“提升”足夠的空間,則可以使用新的IIS Express來解決該問題。

權限肯定是一個問題。

但是您確定正確部署了ASP.Net應用程序嗎?

最簡單,最可靠的方法是使用Visual Studio中的“發布Web”工具:

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

您可以嘗試更改文件夾權限:

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

我嘗試了很多解決方案,但最后的嘗試是啟用Windows身份驗證。 我的網站設置為根據用戶的Windows帳戶自動登錄。

您需要首先安裝該功能,然后在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