473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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(St ring 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.G etCacheDependencies(Hashtable cachedeps, DateTime utcStart) +144
System.Web.Configuration.HttpConfigurationSystem.C omposeConfig(String reqPath, IHttpMapPath configmap) +697
System.Web.HttpContext.GetCompleteConfigRecord(Str ing 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(Excepti on e, Boolean canThrow) +40
System.Web.HttpRuntime.FinishRequest(HttpWorkerReq uest 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\Tempora ry 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?
Nov 18 '05 #1
1 6076
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" <ne***********@msn.com> escribió en el mensaje
news:en**************@TK2MSFTNGP09.phx.gbl...
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(St ring 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.G etCacheDependencies(Hashta
ble cachedeps, DateTime utcStart) +144
System.Web.Configuration.HttpConfigurationSystem.C omposeConfig(String
reqPath, IHttpMapPath configmap) +697
System.Web.HttpContext.GetCompleteConfigRecord(Str ing 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(Excepti on e, Boolean canThrow)
+40
System.Web.HttpRuntime.FinishRequest(HttpWorkerReq uest 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\Tempora ry 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?
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kathy Burke | last post by:
Hi. Totally lost on this one (ok, I admit I'm USUALLY lost!). All works fine in dev environment (P4, localhost server IIS, XP Pro) Asp.net and .Net 1.1 In order to access doc files needed for...
2
by: joeted | last post by:
Hello, I am trying to run a batch file on a (remote) .NET server (i'm not the admin) using system.diagnostics.process I find that the batch file is successfully executed. However, when i...
0
by: steven | last post by:
I have an asp.net webapp running on W2K server with .net framework 1.1 The intranet-app supports 2 languages: dutch (fallback language) and french. The choice is made with 'Request.UserLanguages'...
3
by: Angelo Brusati | last post by:
When using VB6 COM objects on a ASP.NET page, and having the @Page directive with the AspCompat attribute set to true, it causes an error like "Method '~' of object '~' failed" or "Object reference...
7
by: Abubakar | last post by:
Hi, I want to know when was the True and False first included in Basic llanguage? Was it the work of Microsoft or some other company? And who decided the value of true to be -1? Regards, ...
0
by: John Jenkins | last post by:
Hi, can someone tell me why the following scneario occurs. With the nillable attribute set to true on an element that has min occurs set to zero, I generate a class. As expected this adds the...
0
by: Kit Truong | last post by:
The page directive: <% @Page aspcompat="true" %> is causing my web pages to hang. (Page takes a very long time to load, and finally loads with a blank page) Everything was working yesterday...
0
by: Brian | last post by:
Greetings group! I've got a weird one. I have an ASP.NET 1.1 application that has been running on a dual-processor Windows 2000/IIS 5 server for a couple of years. Global.asax has an...
9
by: Jamey Bon | last post by:
As a newbie to C#, I am not sure what I can do about this. I would like to do something like an Enumeration to use "constants" like Yes to indicate true and No for false. But since there seems to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.