在Godaddy注册域名不但价格实惠,而且还会赠送Godaddy的10G的空间300G流量,可不小看这10G空间,这是和Godaddy收费空间放在一个服务器上的,唯一的缺陷是有广告,但是有的页面又没有,这不是今天的主题,你可能会使用asp或者asp.net或者php程序来建站,但是一旦发生错误,无论大小,Godaddy都不会显示详细错误,只会告诉你,出错了,然后停止脚本运行,如果你的是ASP程序,那么你可能会遇到这样的500错误提示

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

如果你的是asp.net,可能遇到的就是这样的500错误信息了

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文件来配置IIS,让Godaddy的IIS给我们显示出详细的错误信息。

请在网站根目录创建web.config文件,然后把以下内容复制到web.config文件里,保存文件即可,然后刷新你的页面,以后无论是你的asp还是php还是asp.net程序的完整错误信息就都会详细显示了。

<?xml version="1.0"?><configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />   <asp scriptErrorSentToBrowser="true"/>
</system.webServer>
</configuration>

 » 订阅本站:http://feed.x2009.net