龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > asp.net编程 >

关于"Server Error in '/' Application"

时间:2009-12-21 11:47来源:未知 作者:admin 点击:
分享到:
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 secur

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>

 

网上参考解决方案


说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 

异常详细信息: System.UnauthorizedAccessException: 对路径“D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\test\db58b339\50f84c0”的访问被拒绝。 

ASP.NET 未被授权访问所请求的资源。请考虑授予 ASP.NET 请求标识访问此资源的权限。ASP.NET 有一个在应用程序没有模拟时使用的基进程标识(通常,在 IIS 5 上为 {MACHINE}\ASPNET,在 IIS 6 上为网络服务)。如果应用程序正在通过 <identity sonate="true"/> 模拟,则标识将为匿名用户(通常为IUSR_MACHINENAME)或经过身份验证的请求用户。 

查资料,找到了解决方法,特贴了出来,让有需要的同仁参考!

由于在iis 6.0中,默认的应用程序池中的标示用的是Network Service,所以在进程中是使用Network Service这个帐号运行来运行w3wp.exe进程,而当我们在运行VS 2003的时候是需要对D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\目录下进行读写操作的,所以看了一下该文件夹,发现没有Network Service,添加上该账号,同时选上FULL CONTROL,问题解决,但是至于为什么会产生这个问题我不大清楚,因为在安装WINDOWS 2003的时候,Network Service账号是存在于Temporary ASP.NET Files该文件夹安全列表中的。

另在IIS6.0中的默认应用程序池-->属性-->标示中把Net Service改成Local System该问题也可以解决。

精彩图集

赞助商链接