Hi Tim,
Bingo! You've just found the problem. Now, here's the solution:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;221790
Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
(e-mail address removed)
This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| Thread-Topic: Error: Failed to start monitoring changes - Framework 1.1
| thread-index: AcTIRUCGjtVrzha2QMaZA8Y04gp7aA==
| X-WBNR-Posting-Host: 202.3.78.9
| From: "=?Utf-8?B?VGltIEQ=?=" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
<
[email protected]>
<
[email protected]>
<
[email protected]>
<
[email protected]>
<
[email protected]>
<
[email protected]>
| Subject: RE: Error: Failed to start monitoring changes - Framework 1.1
| Date: Thu, 11 Nov 2004 15:22:03 -0800
| Lines: 531
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275490
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| Hi Jim,
|
| I tried Filemon and managed to catch a few errors, but the problem is
that
| it's very hard to tell the difference between the requests that have
raised
| the error and those that have not.
|
| For each file, the process seems to be that inetinfo reads the file, then
| aspnet_wp tried to find web.configs in the directory if it is new, then
tries
| to read the requested file (with far fewer events logged than for a
| successful file). I am connecting to the virtual directory using the
same
| domain account that aspnet runs under.
|
| Almost all of the requests for the directories are successful. There are
| two problems (pasted below) the first happens several times, the second
| (which I assume is the problem) just once:
|
| 9:15:21
| AM aspnet_wp.exe:1584 IRP_MJ_QUERY_INFORMATION
\\server\files\downloads\BWM\20041105 INVALID PARAMETER
FileNetworkOpenInformation
|
| 9:15:21
| AM aspnet_wp.exe:1584 IRP_MJ_DIRECTORY_CONTROL
\\server\files\downloads\BWM\20041105 TOO MANY COMMANDS Change Notify
|
| Could this be due to an incompatibility in the NetApp?
|
| I think I'll just have to try doing a Response.Redirect back to the file
| when I catch these exceptions.
|
| Thanks for your help,
|
| Tim
|
| "Jim Cheshire [MSFT]" wrote:
|
| > Hi Tim,
| >
| > Sorry for missing that in your post. I actually read it originally,
but I
| > forgot it by the time I posted my last response.
| >
| > I think the only issue you are having is the error when trying to
monitor
| > directory changes. If that's the case, I think you should simply run
| > Filemon and find out exactly who is being denied access to what and see
if
| > it is an ACLs issue.
| >
| > Jim Cheshire [MSFT]
| > MCP+I, MCSE, MCSD, MCDBA
| > ASP.NET Developer Support
| > (e-mail address removed)
| >
| > This post is provided "AS-IS" with no warranties and confers no rights.
| >
| > --------------------
| > | Thread-Topic: Error: Failed to start monitoring changes - Framework
1.1
| > | thread-index: AcTHhgO6u2rbkRInTluGNwyV3lUxTw==
| > | X-WBNR-Posting-Host: 202.3.78.9
| > | From: "=?Utf-8?B?VGltIEQ=?=" <
[email protected]>
| > | References: <
[email protected]>
| > <
[email protected]>
| > <
[email protected]>
| > <
[email protected]>
| > <
[email protected]>
| > <
[email protected]>
| > | Subject: RE: Error: Failed to start monitoring changes - Framework 1.1
| > | Date: Wed, 10 Nov 2004 16:33:07 -0800
| > | Lines: 392
| > | Message-ID: <
[email protected]>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| > | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet:275195
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > |
| > | Howdy,
| > |
| > | Well perhaps that is the problem, then. As I said in my original
post,
| > we
| > | are mapping all file types for that application to aspnet_isapi.dll.
The
| > | reason we do this is to add headers to the response (content
disposition)
| > | with a HttpModule to allow people to download the files with a left
click
| > and
| > | also provide a more friendly file name when they save. Is there a
| > better
| > | way of doing this other than writing my own ISAPI filter?
| > |
| > | Cheers,
| > |
| > | Tim
| > |
| > |
| > | "Jim Cheshire [MSFT]" wrote:
| > |
| > | > Hi Tim,
| > | >
| > | > No, ASP.NET doesn't care about image files, etc. unless you have
mapped
| > | > those file types to aspnet_isapi.dll. I suspect you haven't.
| > | >
| > | > I would just forget all of this and download Filemon from
SysInternals
| > and
| > | > figure out where you're being denied access.
| > | >
| > | > Jim Cheshire [MSFT]
| > | > MCP+I, MCSE, MCSD, MCDBA
| > | > ASP.NET Developer Support
| > | > (e-mail address removed)
| > | >
| > | > This post is provided "AS-IS" with no warranties and confers no
rights.
| > | >
| > | >
| > | > --------------------
| > | > | Thread-Topic: Error: Failed to start monitoring changes -
Framework
| > 1.1
| > | > | thread-index: AcTHcnLvRQ+Gwk0AS5KQteLCyO9yjw==
| > | > | X-WBNR-Posting-Host: 202.3.78.9
| > | > | From: "=?Utf-8?B?VGltIEQ=?=" <
[email protected]>
| > | > | References: <
[email protected]>
| > | > <
[email protected]>
| > | > <
[email protected]>
| > | > <
[email protected]>
| > | > | Subject: RE: Error: Failed to start monitoring changes -
Framework 1.1
| > | > | Date: Wed, 10 Nov 2004 14:13:04 -0800
| > | > | Lines: 282
| > | > | Message-ID: <
[email protected]>
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain;
| > | > | charset="Utf-8"
| > | > | Content-Transfer-Encoding: 7bit
| > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | Content-Class: urn:content-classes:message
| > | > | Importance: normal
| > | > | Priority: normal
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| > | > | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | Xref: cpmsftngxa10.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:275148
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > |
| > | > |
| > | > | Hi,
| > | > |
| > | > | I let perfmon run for two hours or so without seeing any
application
| > | > | restarts, but decided to give delayNotificationTimeout a try
anyway
| > (none
| > | > of
| > | > | the counters seem to work). I thought it had fixed it, but alas,
| > later
| > | > on
| > | > | the errors starting getting logged again. Is it enough to put it
in
| > the
| > | > | web.config, or do I need to put it into machine.config?
| > | > |
| > | > | The files in the directories that are being monitored are all
JPEGs,
| > | > MPEGs,
| > | > | MP3s, WAVs etc - surely ASP.NET doesn't care about such files (?).
| > | > |
| > | > | One other strange thing I noticed is that sometimes the errors
occur
| > in
| > | > | pairs - one on each of the web servers for different files in the
| > same
| > | > | directory (we have a page that displays 8 storyboard images that
| > reside
| > | > in
| > | > | the virtual directory). The images for an asset are
synchronously
| > copied
| > | > | across to the virtual directory (if they're not already there)
when
| > the
| > | > page
| > | > | is requested... that's why it seems to me that perhaps there is a
| > slight
| > | > lag
| > | > | before the NAS sets permissions properly.
| > | > |
| > | > | Tim
| > | > |
| > | > | "Jim Cheshire [MSFT]" wrote:
| > | > |
| > | > | > Hi Tim,
| > | > | >
| > | > | > We don't recycle the application domain when a change is made
to an
| > | > ASPX
| > | > | > page. As a matter of fact, even if the page contains inline
| > ASP.NET
| > | > code,
| > | > | > we will not recycle the app domain when it's recompiled. We
will
| > | > recompile
| > | > | > the new page and new users will get the new page. Old users
will
| > still
| > | > use
| > | > | > the old page. Only after 15 recompilations (by default) will
we
| > | > recycle
| > | > | > the app domain on a recompile of inline code. You can modify
this
| > | > number
| > | > | > via the numRecompilesBeforeAppRestart attribute of the
| > <compilation>
| > | > | > element in the machine.config file.
| > | > | >
| > | > | > You can determine if your app is restarting by checking the
| > Application
| > | > | > Restarts counter on the ASP.NET v1.1.4322 object in Perfmon.
This
| > is a
| > | > | > cumulative counter since the process started.
| > | > | >
| > | > | > If you think you're getting an access denied due to
recompilation
| > as a
| > | > | > timing issue, you can add a delayNotificationTimeout attribute
to
| > your
| > | > | > httpRuntime element in the machine.config file and set it to
60.
| > For
| > | > | > example:
| > | > | >
| > | > | > <httpRuntime delayNotificationTimeout="60" />
| > | > | >
| > | > | > That will often correct such problems.
| > | > | >
| > | > | > Jim Cheshire [MSFT]
| > | > | > MCP+I, MCSE, MCSD, MCDBA
| > | > | > ASP.NET Developer Support
| > | > | > (e-mail address removed)
| > | > | >
| > | > | > This post is provided "AS-IS" with no warranties and confers no
| > rights.
| > | > | >
| > | > | >
| > | > | > --------------------
| > | > | > | Thread-Topic: Error: Failed to start monitoring changes -
| > Framework
| > | > 1.1
| > | > | > | thread-index: AcTGpn1orkfdwadNRt6iN+VzouvZXA==
| > | > | > | X-WBNR-Posting-Host: 202.3.78.9
| > | > | > | From: "=?Utf-8?B?VGltIEQ=?=" <
[email protected]>
| > | > | > | References:
<
[email protected]>
| > | > | > <
[email protected]>
| > | > | > | Subject: RE: Error: Failed to start monitoring changes -
| > Framework 1.1
| > | > | > | Date: Tue, 9 Nov 2004 13:53:04 -0800
| > | > | > | Lines: 162
| > | > | > | Message-ID:
<
[email protected]>
| > | > | > | MIME-Version: 1.0
| > | > | > | Content-Type: text/plain;
| > | > | > | charset="Utf-8"
| > | > | > | Content-Transfer-Encoding: 7bit
| > | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | > | Content-Class: urn:content-classes:message
| > | > | > | Importance: normal
| > | > | > | Priority: normal
| > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| > | > | > | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | > | Xref: cpmsftngxa10.phx.gbl
| > | > microsoft.public.dotnet.framework.aspnet:274860
| > | > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > | > |
| > | > | > |
| > | > | > | Hey Jim,
| > | > | > |
| > | > | > | Thanks for your reply. I was under the impression that
ASP.NET
| > only
| > | > | > | monitored directories for changes to .config and .dll files.
As
| > DLLs
| > | > | > only go
| > | > | > | in /bin and I have turned config override off for my virtual
| > | > directory,
| > | > | > it
| > | > | > | seemed to make sense that ASP.NET would stop monitoring sub
| > | > directories
| > | > | > for
| > | > | > | changes. Does it monitor other file types? I thought a
request
| > | > needed
| > | > | > to be
| > | > | > | made for a .aspx page in order for a restart to occur, which
| > would
| > | > | > suggest
| > | > | > | that changes to .aspx files are not monitored.
| > | > | > |
| > | > | > | Anyway, the problem isn't a permissions problem - the domain
| > account
| > | > has
| > | > | > | permission to the files and the second request for any files
that
| > | > cause
| > | > | > an
| > | > | > | error works perfectly. The error seems to be completely
| > random...
| > | > | > perhaps
| > | > | > | there's a slight lag in applying the permissions to new files
or
| > | > | > something.
| > | > | > |
| > | > | > | Thanks for your help,
| > | > | > |
| > | > | > | Tim
| > | > | > |
| > | > | > | "Jim Cheshire [MSFT]" wrote:
| > | > | > |
| > | > | > | > Hi Tim,
| > | > | > | >
| > | > | > | > When an application domain starts up, ASP.NET begins
monitoring
| > the
| > | > | > files
| > | > | > | > and folders where the content resides for file change
| > | > notifications.
| > | > | > That
| > | > | > | > way if a file changes in your application, the application
| > domain
| > | > can
| > | > | > be
| > | > | > | > restarted so that the new change takes affect. This is
part of
| > the
| > | > | > | > architecture of ASP.NET and you can't change it.
| > | > | > | >
| > | > | > | > The process account has to have permission to the content
in
| > order
| > | > to
| > | > | > | > monitor it for changes. If you get errors such as this
one,
| > you
| > | > can
| > | > | > use a
| > | > | > | > tool such as Filemon (from
http://www.sysinternals.com) or
you
| > can
| > | > | > audit
| > | > | > | > the location.
| > | > | > | >
| > | > | > | > Jim Cheshire [MSFT]
| > | > | > | > MCP+I, MCSE, MCSD, MCDBA
| > | > | > | > ASP.NET Developer Support
| > | > | > | > (e-mail address removed)
| > | > | > | >
| > | > | > | > This post is provided "AS-IS" with no warranties and
confers no
| > | > rights.
| > | > | > | >
| > | > | > | > --------------------
| > | > | > | > | Thread-Topic: Error: Failed to start monitoring changes -
| > | > Framework
| > | > | > 1.1
| > | > | > | > | thread-index: AcTFNmHaxouOL227SLeYZGGWa0RjYw==
| > | > | > | > | X-WBNR-Posting-Host: 202.3.78.9
| > | > | > | > | From: "=?Utf-8?B?VGltIEQ=?="
<
[email protected]>
| > | > | > | > | Subject: Error: Failed to start monitoring changes -
| > Framework 1.1
| > | > | > | > | Date: Sun, 7 Nov 2004 17:58:03 -0800
| > | > | > | > | Lines: 74
| > | > | > | > | Message-ID:
| > <
[email protected]>
| > | > | > | > | MIME-Version: 1.0
| > | > | > | > | Content-Type: text/plain;
| > | > | > | > | charset="Utf-8"
| > | > | > | > | Content-Transfer-Encoding: 7bit
| > | > | > | > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > | > | > | Content-Class: urn:content-classes:message
| > | > | > | > | Importance: normal
| > | > | > | > | Priority: normal
| > | > | > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > | > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | > | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| > | > | > | > | Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > | > | > | Xref: cpmsftngxa10.phx.gbl
| > | > | > microsoft.public.dotnet.framework.aspnet:274243
| > | > | > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > | > | > |
| > | > | > | > | Hi,
| > | > | > | > |
| > | > | > | > | I originally posted this as a reply to a rather old
thread in
| > | > | > | > | dotnet.framework.general and didn't get any response. I
| > thought
| > | > it
| > | > | > might
| > | > | > | > be
| > | > | > | > | more relevant here; anyone got any ideas? My questions
are
| > | > below...
| > | > | > | > |
| > | > | > | > | "David Good" wrote:
| > | > | > | > |
| > | > | > | > | > We have a network running both Win2k and Win2k3
webservers
| > and
| > | > our
| > | > | > web
| > | > | > | > sites
| > | > | > | > | > reside on a UNC network share that happens to be a
Network
| > | > | > Appliance
| > | > | > | > NAS.
| > | > | > | > | >
| > | > | > | > | > Since moving the web root to the network share on the
NAS,
| > we
| > | > have
| > | > | > been
| > | > | > | > | > receiving various forms of the following error:
| > | > | > | > | >
| > | > | > | > | > Failed to start monitoring changes to [path]
| > | > | > | > | > at System.Web.DirMonCompletion..ctor(DirectoryMonitor
| > dirMon,
| > | > | > String
| > | > | > | > dir,
| > | > | > | > | > Boolean watchSubtree, UInt32 notifyFilter)
| > | > | > | > | > at System.Web.DirectoryMonitor.StartMonitoring()
| > | > | > | > | > at
System.Web.DirectoryMonitor.StartMonitoringFile(String
| > file,
| > | > | > | > | > FileChangeEventHandler callback, String alias)
| > | > | > | > | > at
System.Web.FileChangesMonitor.StartMonitoringFile(String
| > | > alias,
| > | > | > | > | > FileChangeEventHandler callback)
| > | > | > | > | > ...
| > | > | > | > | >
| > | > | > | > | > We have exhausted every resource we can find but every
| > | > reference,
| > | > | > | > including
| > | > | > | > | > the MSDN knowledgebase includes "Access Denied" along
with
| > the
| > | > | > error
| > | > | > | > and some
| > | > | > | > | > security-related solution and indicates that these
problems
| > are
| > | > | > | > resolved with
| > | > | > | > | > the Framework v 1.1.
| > | > | > | > |
| > | > | > | > | We have a similar setup (including the Network Appliance)
and
| > | > have
| > | > | > | > getting
| > | > | > | > | exactly the same error. We have tried changing the file
| > | > permissions
| > | > | > (the
| > | > | > | > | domain account under which ASP.NET runs has full control
over
| > the
| > | > | > | > | directories) and have also applied the registry settings
| > | > mentioned
| > | > | > | > elsewhere
| > | > | > | > | in this thread; both without luck.
| > | > | > | > |
| > | > | > | > | The root of the application in which we get the error is
| > actually
| > | > on
| > | > | > a
| > | > | > | > local
| > | > | > | > | drive, but we have mapped a share on the NAS as a virtual
| > | > directory
| > | > | > | > | (connecting using the same domain user under which
ASP.NET
| > runs).
| > | >
| > | > | > The
| > | > | > | > | virtual directory has many sub directories that are
created
| > | > | > dynamically
| > | > | > | > by a
| > | > | > | > | backend application. The error only ever seems to occur
the
| > | > first
| > | > | > time
| > | > | > | > | someone makes a request for a file, but not necessarily
the
| > first
| > | > | > request
| > | > | > | > for
| > | > | > | > | a file in that directory.
| > | > | > | > |
| > | > | > | > | As the files in the virtual directory are typically files
for
| > | > people
| > | > | > to
| > | > | > | > | download, we have remapped all file types to
aspnet_isapi.dll
| > and
| > | > use
| > | > | > a
| > | > | > | > | HttpModule to add headers to the response so that people
can
| > do
| > | > left
| > | > | > | > click
| > | > | > | > | downloads (that is, a left click brings up a save as
dialog
| > | > instead
| > | > | > of
| > | > | > | > the
| > | > | > | > | browser trying to open the file). To ensure all files
are
| > | > treated as
| > | > | > | > static
| > | > | > | > | files we added the following to ~/web.config:
| > | > | > | > |
| > | > | > | > | <location path="Files">
| > | > | > | > | <system.web>
| > | > | > | > | <httpHandlers>
| > | > | > | > | <add verb="*" path="*"
| > | > | > type="System.Web.StaticFileHandler"/>
| > | > | > | > | </httpHandlers>
| > | > | > | > | </system.web>
| > | > | > | > | </location>
| > | > | > | > |
| > | > | > | > | What I want to know is, why does ASP.NET need to monitor
the
| > | > | > directory
| > | > | > | > | anyway? I suspected that it may monitor the sub
directories
| > for
| > | > new
| > | > | > or
| > | > | > | > | modified web.config files and thought that adding
| > | > | > allowOverride="false"
| > | > | > | > to
| > | > | > | > | the <location> section above might help. Alas, it did
not.
| > | > | > | > |
| > | > | > | > | Does anyone know of some way I can get ASP.NET to give up
| > trying
| > | > to
| > | > | > | > monitor
| > | > | > | > | the directories? As far as I can tell it's doing nothing
but
| > | > | > throwing
| > | > | > | > errors
| > | > | > | > | at completely random times.
| > | > | > | > |
| > | > | > | > | Is there a Microsoft person out there who might be able
to
| > shed
| > | > some
| > | > | > | > light
| > | > | > | > | on this?
| > | > | > | > |
| > | > | > | > | Cheers,
| > | > | > | > |
| > | > | > | > | Tim
| > | > | > | > |
| > | > | > | > |
| > | > | > | >
| > | > | > | >
| > | > | > |
| > | > | >
| > | > | >
| > | > |
| > | >
| > | >
| > |
| >
| >
|