发布MVC程序的时候经常遇到这种情况,每次都要搞好久才找到问题。最终找到解决办法:

报500错误大部分的情况还是程序存在异常,但全部被MVC错误拦截成了友好提示,

只要在Web.config下添加一行配置即可

<system.web>
\\其他配置代码
\\其他配置代码
\\其他配置代码 在system.web节点下添加此代码可现实详细错误信息,解决问题后设置为On 继续提示友好信息
<customErrors mode="Off" />
</system.web>

MVC 本地运行可以发布到IIS 报Sorry, an error occurred while processing your request.解决方案的更多相关文章

  1. apache include 文件包含引用的方法 报错 [an error occurred while processing this directive]

    今天遇到在某平台买的虚拟主机服务器不支持    下面的这样的写法 <!--#Include file="/templets/2013new/header.htm"--> ...

  2. appium报错:An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET

    Appium Desktop版本:1.9.0 xcode版本:9.4.1 测试机:iPhone7  11.3系统 问题描述:在xcode上的produc的text运行是可以将WebDriverAgen ...

  3. eclipse 中离线安装activiti插件,报错“An error occurred while collecting items to be installed session context was:(...”

    eclipse 中离线安装activiti插件,报错“An error occurred while collecting items to be installed session context ...

  4. SOAPtest报错:error occurred during initialization of vm解决方法

    参考:http://forums.parasoft.com/index.php?act=ST&f=36&t=614 安装SOAPtest报错:error occurred during ...

  5. 踩坑系列《三》 java -version 报错出现Error occurred during initialization of VM java/lang/NoClassDefFoundError:

    之前导入一个项目,因为该项目Spring版本过低,只能适用于1.7版本,装了jdk1.7版本.安装配置好后,打开cmd窗口,执行 java -version 指令发现没像正常一样显示版本信息,而是报了 ...

  6. python appium自动化报“Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server

    运行app自动化代码时报"Encountered internal error running command: UnknownError: An unknown server-side e ...

  7. 本地运行aws lambda credential 配置 (missing credential config error)

    参照这篇文章 http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-sha ...

  8. Windows本地运行调试Spark或Hadoop程序失败:ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path

    报错内容 ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path java.io.IOExce ...

  9. NETCore项目报错 An error occurred while starting the application

    在发布到IIS的webApi项目中,运行时报出以上错误, 解决方法: 1.打开发布目录文件夹,找到web.config文件 2.打开web.config找到stdoutLogEnabled=" ...

随机推荐

  1. Spring 在多线程中,bean的注入问题

    最近碰到了一个问题,使用SSM框架,在Service层需要另开一个线程,这个线程专门用来做一些操作,并将结果写入数据库中.但是在线程中使用@Resource或者@Autowired注入全部为NULL, ...

  2. JAVA开发错误总结(仅记录遇到的错误---后续不断更新......)

    =======华丽分割线(工具总结)===================== 1:Maven项目中junit测试找不到主类的问题 Class not found com.test.utils.tes ...

  3. Neo4j 3.0 存储过程

    Neo4j 3.0 提供一个新的功能“存储过程”,该功能并不是Neo4j-Server的扩展,而是可以直接运行的. 在写这篇文章的时候,只能通过预备好的语句去执行 1 CALL package.pro ...

  4. TortoiseGit编辑全局变量支持https

    在windows,右键,进入tortoisegit的设置窗口,在左边树形菜单选Git,然后店"编辑全局.gid/config"按钮 输入以下文字 [http] sslVerify ...

  5. css table-cell实现图文排列水平对齐

    今天遇到一个样式:图文两列排列. 由于图片大小固定,于是就想到了用table-cell实现. <div class="container"> <div class ...

  6. Centos启动Cassandra交互模式失败:No appropriate python interpreter found

    在CentOS6.5安装好Cassandra后,启动交互模式: bin/sqlsh 192.168.10.154 时,报错 No appropriate python interpreter foun ...

  7. 解决driver.findElement(By)运行到此处报null指针问题

    1.由于自动化页面上的元素定位太多,主要是通过By来定位,而By提供了id,xpath,name差不多就可以定位到元素 可以使用一个配置文件存储页面上的定位By值,然后从配置文件获取by值,行程by方 ...

  8. js 根据不同情况引入不同操作

    1.根据分辨率不同引入不同的JS // 根据不同的分辨率引入不同的JS代码 <script> if (screen.width == 1440 && screen.heig ...

  9. synchronized和ReentrantLock

    一.什么是sychronized sychronized是java中最基本同步互斥的手段,可以修饰代码块,方法,类. 在修饰代码块的时候需要一个reference对象作为锁的对象. 在修饰方法的时候默 ...

  10. Java—数组

    1 声明数组变量   dataType[] arrayRefVar; 2 实例数组         double[] myArray; 3 创建数组         arrayRefVar =new ...