簡體   English   中英

Localhost部署-ASP.NET MVC 5

[英]Localhost deployment - asp.net mvc 5

我正在嘗試將我的應用程序部署到localhost,但無法完成。 到目前為止,我已執行以下操作:

屬性-> Web->使用本地IIS /創建虛擬目錄

當我運行我的應用程序時,它說

The requested page cannot be accessed because the related configuration data for the page is invalid.

配置源:

Config Source:
34:   <system.webServer>
35:     <modules>
36:       <remove name="FormsAuthenticationModule"/>

配置錯誤:

Config Error       This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

如果刪除模塊並開始調試,則會得到以下信息:

The Web server could not find the requested resource.

如果我手動轉到localhost / AppName,則會得到以下信息:

The Web server is configured to not list the contents of this directory.

和localhost / AppName / Home

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

和路徑D:\\ Projects \\ AppName \\ AppName \\ home(與物理路徑不對應,應該是D:\\ Projects \\ AppName \\ AppName \\ Controllers \\ Home)

我該怎么辦?

編輯:我也給我的用戶完全權限。 怎么了?

您可以檢查應用程序池中的框架版本是否設置為4.0.30319(4.5)並確保文件夾結構正確

添加一個全局錯誤處理程序並記錄接收到的異常以查看發生了什么。

此鏈接包含有關錯誤處理的示例。 https://www.simple-talk.com/dotnet/asp.net/handling-errors-effectively-in-asp.net-mvc/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM