一个在本地以及国内空间用得好端端的程序,上了Godaddy似乎就被判了不符合规范的罪行。下面就来分享一下我个人遇到过的困难和解决办法,希望对需要的朋友能有所帮助。
随便找了个程序改了改,本地测试OK,上传至Godaddy,500了,不支持GB2312?最后没办法,把整个程序从前台到后台都转成了UTF-8,问题解决。
不小心把数据库路径搞错了,500,好吧,排查清楚以后,改正便OK。
网站老是生成不了静态文档,搞了半天才发现是文件夹权限问题,安装织梦等CMS程序时可以注意下LINUX空间下文件夹的权限配置情况,而WINDOWS空间,则需要把ROOT的读写权限也全打开,这样才能正常运行一些程序,比如ZBlog。
这次麻烦大了,怎么都找不到原因,本地和国内空间上运行都正常,克偏偏Godaddy打死都是500,我真想发邮件过去臭骂一顿,太莫名其妙了。结果朋友说,能让它不显示500么?我还打算着邮件问问客服后台怎么做相关操作呢,原来早有解决办法,感谢先吃螃蟹的人分享了吃螃蟹的心得。先来看看螃蟹长啥样:
ASP错误信息
Server Error 500 – Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
ASP.NET错误信息
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 atag within a “web.config” configuration file located in the root directory of the current web application. This tag should then have its “mode” attribute set to “Off”.
接着,就来把这螃蟹狠狠的吃掉吧!我们要做的就是,使用web.config文件来配置IIS,让Godaddy的IIS给我们显示出详细的错误信息。
请在网站根目录创建web.config文件,然后把以下内容复制到web.config文件里,保存文件即可,然后刷新你的页面,以后无论是你的asp还是php还是asp.net程序的完整错误信息就都会详细显示了。
- web.config
<?xml version="1.0"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
</system.webServer>
</configuration>
还犹豫什么,赶紧试试吧。最后就根据错误信息再完善一下程序,以符合Godaddy的高标准!








已有人对此文发表了评论