Failed to start monitoring file changes when impersonation="true".

Discussion in 'ASP .Net' started by Edward Yang, Feb 20, 2004.

  1. Edward Yang

    Edward Yang Guest

    I setup web.config with impersonation="true". On our local server the project works great. I did the same procedures on our staging server, but it failed with an impossible error:

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Access denied to 'C:\Inetpub\wwwroot\myapp\default.aspx'. Failed to start monitoring file changes.
    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.Web.HttpException: Access denied to 'C:\Inetpub\wwwroot\myapp\default.aspx'. Failed to start monitoring file changes.

    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:


    [HttpException (0x80070005): Access denied to 'C:\Inetpub\wwwroot\myapp\default.aspx'. Failed to start monitoring file changes.]
    System.Web.DirectoryMonitor.AddFileMonitor(String file) +381
    System.Web.DirectoryMonitor.StartMonitoringFile(String file, FileChangeEventHandler callback, String alias) +76
    System.Web.FileChangesMonitor.StartMonitoringPath(String alias, FileChangeEventHandler callback) +495
    System.Web.Caching.CacheDependency.Init(Boolean isPublic, Boolean isSensitive, String[] filenamesArg, String[] cachekeysArg, CacheDependency dependency, DateTime utcStart) +1535
    System.Web.Caching.CacheDependency..ctor(Boolean isSensitive, String[] filenames, DateTime utcStart) +50
    System.Web.Configuration.HttpConfigurationSystem.GetCacheDependencies(Hashtable cachedeps, DateTime utcStart) +144
    System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String reqPath, IHttpMapPath configmap) +697
    System.Web.HttpContext.GetCompleteConfigRecord(String reqpath, IHttpMapPath configmap) +434
    System.Web.HttpContext.GetCompleteConfig() +49
    System.Web.HttpContext.GetConfig(String name) +195
    System.Web.CustomErrors.GetSettings(HttpContext context, Boolean canThrow) +20
    System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow) +40
    System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) +479





    --------------------------------------------------------------------------------

    Version Information: Microsoft .NET Framework Version:; ASP.NET Version:

    Note! There is no text afeter the last colon! I copied all the text on the error page.

    I am impersonating my account, which is in Administrators group on the staging server, and I have full access control to the myapp project directory. Additionally, I also tried to give full access control to my account on the %windir%microsoft.net\framework\v1.x.x.xxx\Temporary ASP.NET Files, but the error persists. Actually this step is not necessary, since Administrators already have full access control of the directories.

    Can anyone help?
     
    Edward Yang, Feb 20, 2004
    #1
    1. Advertising

  2. Seems to be a permissions problem

    With impersonate = true, the thread takes the identity of either:
    - the anonymous IIS user (if it is allowed for the Web application and no
    ACL restriction nor Web.config forces the authentication of a Windows user)
    - the Windows user (else)

    In any case, whoever is impersonated lacks the necessary permissions to the
    web folders and the pages can not be compared / recompiled if necessary

    Regards
    Jose.

    "Edward Yang" <> escribió en el mensaje
    news:...
    I setup web.config with impersonation="true". On our local server the
    project works great. I did the same procedures on our staging server, but it
    failed with an impossible error:

    Server Error in '/' Application.


    Access denied to 'C:\Inetpub\wwwroot\myapp\default.aspx'. Failed to start
    monitoring file changes.
    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.Web.HttpException: Access denied to
    'C:\Inetpub\wwwroot\myapp\default.aspx'. Failed to start monitoring file
    changes.

    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:


    [HttpException (0x80070005): Access denied to
    'C:\Inetpub\wwwroot\myapp\default.aspx'. Failed to start monitoring file
    changes.]
    System.Web.DirectoryMonitor.AddFileMonitor(String file) +381
    System.Web.DirectoryMonitor.StartMonitoringFile(String file,
    FileChangeEventHandler callback, String alias) +76
    System.Web.FileChangesMonitor.StartMonitoringPath(String alias,
    FileChangeEventHandler callback) +495
    System.Web.Caching.CacheDependency.Init(Boolean isPublic, Boolean
    isSensitive, String[] filenamesArg, String[] cachekeysArg, CacheDependency
    dependency, DateTime utcStart) +1535
    System.Web.Caching.CacheDependency..ctor(Boolean isSensitive, String[]
    filenames, DateTime utcStart) +50

    System.Web.Configuration.HttpConfigurationSystem.GetCacheDependencies(Hashta
    ble cachedeps, DateTime utcStart) +144
    System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String
    reqPath, IHttpMapPath configmap) +697
    System.Web.HttpContext.GetCompleteConfigRecord(String reqpath,
    IHttpMapPath configmap) +434
    System.Web.HttpContext.GetCompleteConfig() +49
    System.Web.HttpContext.GetConfig(String name) +195
    System.Web.CustomErrors.GetSettings(HttpContext context, Boolean
    canThrow) +20
    System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow)
    +40
    System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext
    context, Exception e) +479








    Version Information: Microsoft .NET Framework Version:; ASP.NET Version:
    Note! There is no text afeter the last colon! I copied all the text on the
    error page.

    I am impersonating my account, which is in Administrators group on the
    staging server, and I have full access control to the myapp project
    directory. Additionally, I also tried to give full access control to my
    account on the %windir%microsoft.net\framework\v1.x.x.xxx\Temporary ASP.NET
    Files, but the error persists. Actually this step is not necessary, since
    Administrators already have full access control of the directories.

    Can anyone help?
     
    Jose Marcenaro, Feb 20, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carl Prothman [MVP]
    Replies:
    1
    Views:
    4,222
    Ali_ggl
    Mar 17, 2008
  2. Mark
    Replies:
    7
    Views:
    4,894
  3. Robin
    Replies:
    1
    Views:
    3,029
    JustMe
    Oct 4, 2004
  4. Jay Ge
    Replies:
    5
    Views:
    824
    Karl Seguin
    Nov 17, 2004
  5. bdb112
    Replies:
    45
    Views:
    1,346
    jazbees
    Apr 29, 2009
Loading...

Share This Page