MVC4 本地正常运行,发布到IIS7->403 - 禁止访问: 访问被拒绝。



禁止访问: 访问被拒绝。您无权使用所提供的凭据查看此目录或页面。”

解决方案-在<system.webServer>后加上:<modules runAllManagedModulesForAllRequests="true"/> 



“Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".



3、按错误提示webconfig 加上:<customErrors mode="Off"/>





玩咖指针 2020-03-04 16:59:41