Failed to start monitoring file changes

D

Damon Allison

Hello,

I'm trying to track down the following ASP.NET error:
Access denied to 'd:\damon\TravReport\Test.aspx'. Failed to start monitoring
file changes.
[HttpException (0x80070005): Access denied to
'd:\damon\TravReport\Test.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) +151
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


I believe the problem is related to impersonation to some extent. In IIS, I
have the anonymous user set to "comUser". This user has full permissions on
the file test.aspx in question. Everything works fine right up until I add
an identity element to my web.config. Once I have the identity element in
web.config, the error occurs. (user is in "administrators", password
verified correct). If I remove the identity line, everything will work as
desired.

All my google searching says to "give the user read rights to the file".
"Everyone" has "Full Rights" to my d:\ (and subdirs). I've read and
followed the KB article below and no luck. I'd sure appreciate any help you
may have towards solving this rather confusing problem related to windows
"security". If I could read the source code to "DirectoryMonitor", I would
have more information as to what permissions are required to not trigger the
error. Since the class is not documented, I'm afraid I don't have any other
insight to pass on.

Thank you,

Damon



In my web.config file, I have the following:

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<identity impersonate="true" userName="comUser" password="comUser"/>
<customErrors mode="Off"/>
</system.web>
</configuration>



"Failed to Start Monitoring Directory Changes"
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q317955
 
J

Jay Ge

:cry:

i met the same issue with my web. and i have given the impersonated
account permisson to access C:\ and D:| (and its subdirs), but the
issure persists.

need your help/suggestion!

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top