总是报这样的错误,只有电脑重启动才可以继续调试,按照如下提示
(若要授予 ASP.NET 对文件的写访问权,请在资源管理器中右击该文件,选择“属性”,然后选择“安全”选项卡。单击“添加”添加适当的用户或组。突出显示 ASP.NET 帐户,选中所需访问权限对应的框。)
但是我用的XP,右击该文件选择“属性”后,里面没有“安全”选项卡呀?怎么解决?
//////////////////////////////////////////////////////////////////////////////
具体报错界面:
“/newprj”应用程序中的服务器错误。
--------------------------------------------------------------------------------对路径“C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\newprj\93b468af\b03b9be7\hash.web”的访问被拒绝。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.UnauthorizedAccessException: 对路径“C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\newprj\93b468af\b03b9be7\hash.web”的访问被拒绝。 ASP.NET 未被授权访问所请求的资源。请考虑授予 ASP.NET 请求标识访问此资源的权限。ASP.NET 有一个在应用程序没有模拟时使用的基进程标识(通常,在 IIS 5 上为 {MACHINE}\ASPNET,在 IIS 6 上为网络服务)。如果应用程序正在通过 <identity impersonate="true"/> 模拟,则标识将为匿名用户(通常为 IUSR_MACHINENAME)或经过身份验证的请求用户。 若要授予 ASP.NET 对文件的写访问权,请在资源管理器中右击该文件,选择“属性”,然后选择“安全”选项卡。单击“添加”添加适当的用户或组。突出显示 ASP.NET 帐户,选中所需访问权限对应的框。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  堆栈跟踪: 
[UnauthorizedAccessException: 对路径“C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\newprj\93b468af\b03b9be7\hash.web”的访问被拒绝。]
   System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +44
   System.IO.StreamWriter.CreateFile(String path, Boolean append) +55
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +49
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) +20
   System.Web.Compilation.PreservedAssemblyEntry.WritePreservedSpecialFilesCombinedHash(Int64 hash)
   System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext context) +848
   System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpContext context) +97
   System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile) +29
   System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation() +91
   System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) +148
   System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() +125
   System.Web.UI.TemplateParser.GetParserCacheItem() +88
   System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser& parser) +171
   System.Web.HttpApplicationFactory.CompileApplication(HttpContext context) +43
   System.Web.HttpApplicationFactory.Init(HttpContext context) +485
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +170
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +414 
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573

解决方案 »

  1.   

    C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\newprj\93b468af\b03b9be7\hash.web
    把IIS_WPG用户组添加到这个路径上。
      

  2.   

    我也遇到这个问题咧,
    那是你的asp.net调试进程没有访问这个目录的权限而已
    不过不用担心,
    在程序正式发布以后,对一般的目录的访问一般不会有权限方面的问题出现
      

  3.   

    今天我也碰到这个问题,在windows2003中,是这么解决的:
    对下面这个目录,添加两个用户共享:ASPNET和WEB SERVICE
    C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files