编译错误BC30318的解决方法

        用VS2005打开DNN4.4的解决方案,可以正常编译。但调试时会出现编译错误BC30318。下面是编译时的出错信息:
Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30138: 无法在路径“C:\WINDOWS\TEMP\”中创建临时文件: 拒绝访问。

Source Error:

[No relevant source lines]

Source File: vbc :    Line: 0
Show Detailed Compiler Output:

 

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
        奇怪的是,在VS2005中可以正常编译。为什么调试时编译就不行了呢。仔细看一下错误描述。猜想调试时可能会在临时目录下创建一些临时用的中间文件。这问题可能又是B/S模式下常见的安全性问题了。
打开资源管理器,导航到c:\windows下,右击temp目录从弹出的菜单上选择“共享与安全...”(见下图),可以看到并没有与asp.net相关的用户。


        点击添加按钮添加network service用户(2003下,如是XP应该是asp_net),并赋上写入的权限。然后再重新调试,正常。能暂时解决BC30318的编译错误,但不知这样解决后会不会造成安全性的隐患呢?

posted on 2007-03-14 15:02  漂泊者  阅读(1830)  评论(1编辑  收藏  举报

导航