zoukankan      html  css  js  c++  java
  • MVC4 本地正常运行,发布到IIS7->403

    代码编写完成,计划发布一个版本测试,没想到发布到IIS7 竟然报错“403-禁止访问”。还真第一次遇到这种问题。。。。。

    折腾了半天,终于解决。

    1、提示报错403:

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

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

    2、有了第一步,出现的问题也不一样,很开心,至少有进展

    “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"/>

    4、好像越来越明朗了

     引用“Microsoft.Web.Infrastructure.dll”。并把复制到本地改为“True”

     

    大功告成

    转自:http://www.cnblogs.com/PEPE/p/4341379.html?utm_source=tuicool&utm_medium=referral

  • 相关阅读:
    修改FileUpload样式
    ASP.NET 中JSON 的序列化和反序列化
    C# 2.0中泛型编程初级入门
    50条经典爱情观
    (转贴)追MM与Java的23种设计模式
    猴子和香蕉的故事
    35岁前成功的12条黄金法则
    几个小故事
    java与C++的虚函数比较
    flask 源码解析:上下文(一) SUNNEVER
  • 原文地址:https://www.cnblogs.com/mrma/p/5404574.html
Copyright © 2011-2022 走看看