我因为要更改程序中的配置,我修改了web.config以后就出现如下的错误:
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 tag 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".
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 configuration tag to point to a custom error page URL.
为了查看错误,我把
这段放到了configuration中,想显示具体的错误信息,但是还是不行,还是只显示这个错误信息,出现这样的错误不外乎就是代码或者配置出错,但是这个站点以前是能够正常运行的,我只是修改了一下web.config的文件后就开始报错了。我随后查看了IIS中配置的权限,看到对于这个目录是只读的,难道是权限的问题?因为是只读,我修改后的文件不能加载,然后直接中断?只能尝试一下,我把文件的写入全写和脚本资源访问都勾选了,然后修改文件,重新启动IIS,没有想到可以了,我已经可以使用了,然后我在去掉写入和脚本资源访问,还是能访问。看样子问题是出在了权限上。
阅读(4557) | 评论(0) | 转发(0) |