应用程序错误
在本地运行正常,传到远程后,出现以下错误,但我在config里面自定义错误确实是设成“off”的
请大家帮帮我
谢谢了!
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".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
我用的是vs2005开发的,服务器也装了.net2.0
[解决办法]
到服务器上看看,到底报什么错误信息,这个信息是被屏蔽了的
[解决办法]
运行时错误
描述:一个应用程序错误发生在服务器上.目前定制误差设置为这项应用防止细节应用程序错误,从被认为是远程(出于安全原因) . ,但它有可能被认为是由浏览器运行于本地服务器机器.
详情:让细节这一特定错误讯息,可浏览远程计算机,请创建一个<customerrors>标签内的" web.config "配置文件位于根目录下的当前的web应用.这<customerrors>标签,然后有它的"模式"属性设置为"关闭" .
< ! -- web.config配置文件-- >
<configuration>
<system.web>
<customerrors mode="off"/>
< / system.web >
< /配置>
注:当前的错误页面,你可以看到,可取而代之的是一个定制的错误页面,修改" defaultredirect "属性的应用程序的配置<customerrors>标签指向一个定制的错误页面的url .
< ! -- web.config配置文件-- >
<configuration>
<system.web>
<customerrors mode="remoteonly" defaultredirect="mycustompage.htm"/>
< / system.web >
< /配置>
[解决办法]
文章来源:http://zhidao.baidu.com/question/33439938.html
[解决办法]
http://www.xunlei6.org.cn/xlabout/245.html
可以看看这个
------解决方案--------------------
原因很多。多为 IIS 设置问题。 对比一下本地和远程的设置。
以下是两种原因:
原因一
Cause
This error has been observed when a new .NET web application has been copied to a server or renamed on the server.
To remedy the situation:
- Open the IIS Manager
- Browse to the web site and folder that your Ultimate Survey installation is in
- Open the properties for this folder
- On the "Directory" tab, there is a section that says "Application Settings"
- Press the "Create" button and apply the changes
- Try to open the application again
原因二
Folder permission:
- Set "Modify" permission to source code folder
- Set "Script and Execution" to the folder at "Home Directory" tab in IIS
[解决办法]
上文原因一的链接
http://www.prezzatech.com/kb/articles/kb-1013-ultimate_survey_softwareiis_application.asp
[解决办法]
<customErrors mode="off" />
==========
<customErrors mode="Off" />
注意大小写