首页 新闻 赞助 找找看

急急急!网站上传服务器无法运行,本机运行都可以的

0
悬赏园豆:10 [待解决问题]

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>


请问这是为什么啊?

开始无法运行,讲 .net 1.0 换成2.0 了可以运行登录首页,但是登录的时候就报如上错误。急!

wenlong的主页 wenlong | 初学一级 | 园豆:192
提问于:2013-10-26 09:06
< >
分享
所有回答(3)
1

错误提示说的比较清楚了, 把

网站根目录下的web.config里面更新(若没有就添加) customErrors节点

<customErrors mode="Off"/>
然后可以再有错就可以看到具体的异常堆栈, 进而很容易找到问题的根源.

Jairo Jin | 园豆:204 (菜鸟二级) | 2013-10-26 09:11
0

为我网站的安全性考虑,IIS/ASP.NET的配置默认是关闭错误显示的。

就是说,其他人如果这时候访问你的网站,看到也是这样莫名其妙的错误。

而不是 Select * from s.....这类型的错误,因为这类错误显示出来,可能会暴露你网站的设计语言,

数据库名称、数据表名称或是运行逻辑之类,从而造成安全隐患。

所以开放显示错误功能是需要开发员手工打开的,这样你才能看到有用的错误信息。

(所谓的有用的错误信息就是具体的错误,而不是我的电脑坏了,怎么办)

你现在先要做的事情就是打开错误显示,然后才有可能往下解决其他问题。

 

通常情况下,本机与服务器的差别可能是

1、net FRAMEWORK 版本不同

2、安装的组件不同

3、服务器上的权限有问题(NET网站这种情况是最多的)

 

爱编程的大叔 | 园豆:30839 (高人七级) | 2013-10-26 11:20
0

不要改配置

登陆你的服务器,用你服务器上的浏览器访问一下就能看到真实的异常信息了

田林九村 | 园豆:2367 (老鸟四级) | 2013-10-27 11:14
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册