[英]Publishing website on IIS error
大家好,我通過IIS發布網站時,都會收到此錯誤代碼,如下所示。 你能幫助我嗎 ?
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 27: </assemblies>
Line 28: </compilation>
Line 29: <authentication mode="Forms">
Line 30: <forms loginUrl="~/Account/LogOn" timeout="2880" />
Line 31: </authentication>
Source File: C:\Users\furkan\Desktop\WebCity\webcity\web.config Line: 29
然后我將根字典轉換為應用程序,但出現此錯誤
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
Line 17: <system.web>
Line 18: <httpRuntime requestValidationMode="2.0" />
Line 19: <compilation debug="true" targetFramework="4.0">
Line 20: <assemblies>
Line 21: <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Source File: C:\Users\furkan\Desktop\WebCity\WebCity\web.config Line: 19
第一個問題的答案是:
這通常意味着您尚未將網站目錄配置為應用程序。 打開IIS管理器,找到您網站的根目錄(web.config在其中),右鍵單擊,然后選擇“轉換為應用程序”。
對於新問題,這是.NET版本的問題。 您或者沒有安裝asp.net 4.0,或者您將應用程序池設置為使用錯誤的框架。 可能是后者,因此請轉到站點的高級設置,選擇“應用程序池”設置,然后選擇一個名為ASP.NET 4.0或任何其他使用4.0框架的應用程序池。 如果沒有,則需要安裝.NET 4.0
您是否檢查過某個子目錄中是否有多個web.config?
此處描述問題的鏈接
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.