环境是,我在本机开发正常运行,我想试一下发布,就用copy来发布一下在本机的另外的一目录下,我没有用设置其它,直接就是用proj工具栏中的copy来他自己建立的虚目录,我完成后运行就不行
我是用的proj中的copy project来发布的
-------------------------------
Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\wmvards\12c86643\85aa1947" is denied. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.UnauthorizedAccessException: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\wmvards\12c86643\85aa1947" is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: 
[UnauthorizedAccessException: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\wmvards\12c86643\85aa1947" is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
   System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +632
   System.IO.Directory.CreateDirectory(String path) +195
   System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext context)
   System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpContext context)
   System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile)
   System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation()
   System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound)
   System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath()
   System.Web.UI.TemplateParser.GetParserCacheItem()
   System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser& parser)
   System.Web.HttpApplicationFactory.CompileApplication(HttpContext context)
   System.Web.HttpApplicationFactory.Init(HttpContext context)
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +170
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +414 --------------------------------------------------
我的Web.config是这样
 <customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.htm" /> 
我把MODE改为off,提示这样的错误Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The 'mode' attribute is case sensitive and must be one of the following values: On, Off, RemoteOnly.Source Error: 
Line 41:            that you do not display application detail information to remote clients.
Line 42:     -->
Line 43:     <customErrors    mode="off" defaultRedirect="Errorpage.htm"
Line 44:     /> 
Line 45: 
 Source File: C:\lotVARDS\web.config    Line: 43 

解决方案 »

  1.   

    我另在IIS权限中设置了一下一下虚目录,现在以出现这种错误
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: 
    Line 63:           (unauthenticated) users.
    Line 64:     -->
    Line 65:  <authentication mode="Forms">
    Line 66:      <forms name=".ASPXAUTH" loginUrl="default.aspx" protection="All" timeout="60" path="/" />
    Line 67:     </authentication>
     
    -----------------
    <authentication mode="Forms">在这一行出错,
    我WEB是这样设置<authentication mode="Forms">
         <forms name=".ASPXAUTH" loginUrl="default.aspx" protection="All" timeout="60" path="/" />
     </authentication>
        
        <authorization>
            <deny users="?" /> <!-- Allow all users -->
                <!--  <allow     users="[comma separated list of users]"
                                 roles="[comma separated list of roles]"/>
                      <deny      users="[comma separated list of users]"
                                 roles="[comma separated list of roles]"/>
                -->
        </authorization>
        
    UP
      

  2.   

    要将虚拟目录创建为应用程序,iis里有设置
      

  3.   

    设置应用程序是IIS目录中的appliction name吧,我设置成默认的
    出现authentication mode="Forms">在为一行也错