发布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. 使用JavaMail实现发送邮件功能

    package com.dunn.model; import java.util.Properties; import javax.mail.Address; import javax.mail.Me ...

  2. MongoDB 备份(mongodump)与恢复(mongorestore)

    MongoDB数据备份 在Mongodb中我们使用mongodump命令来备份MongoDB数据.该命令可以导出所有数据到指定目录中. mongodump命令可以通过参数指定导出的数据量级转存的服务器 ...

  3. Java-用switch判断季节

    import java.util.*;class Demo3 { public static void main(String[] args) { //需求 :输入一个月份 ,判断月份属于哪一个季节 ...

  4. Android Studio 如何切换sdk

      选择File-->Project Structure 弹出框中选择Project 看到中间的Project SDK项. 点击Edit或者New 然后就可以选择Build target 和Ja ...

  5. SAP播放本地视频及音频(仅限于window MediaPlayer可播放文件)

    这个是从SCN上看到的,自己稍加修改,编制,做的还可以,可以播放视频,音频,唯一的不足就是不能控制播放视频的显示窗口大小,希望有人能帮忙解决,感激! 视频播放类:(新建类Z_CL_MEDIA,点击基于 ...

  6. Seajs教程 配置文档

    seajs.config Obj alias Obj 别名配置,配置之后可在模块中使用require调用require('jQuery'); seajs.config({ alias:{ 'jquer ...

  7. Python【8】-分析json文件

    一.本节用到的基础知识 1.逐行读取文件 for line in open('E:\Demo\python\json.txt'): print line 2.解析json字符串 Python中有一些内 ...

  8. enable feature AJAX of MOSS2007

    As default, the feature AJAX of MOSS2007 is disabled, so the site web configuration file should be m ...

  9. [转]http-关于application/x-www-form-urlencoded等字符编码的解释说明

    在Form元素的语法中,EncType表明提交数据的格式 用 Enctype 属性指定将数据回发到服务器时浏览器使用的编码类型. 下边是说明: application/x-www-form-urlen ...

  10. 不同json如何使用jsonArray以及ajax如何取,实现读取新闻

    jsp界面 <%@ page contentType="text/html;charset=gb2312"%><%@page import="org.j ...