473,782 Members | 2,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Invalid file name for monitoring

I am writing a simple reverse proxy using .Net.

The basic design is to capture all traffic (from all URL's) in an
HttpHandler and the respond accordingly.

The problem is that I when a URL is received that contains a "`" character I
get the exception listed above; and the call stack listed below.

Questions;
1) Where can I find more documentation on the FileChangesMoni tor class?
2) Is there anyway to disable the caching via a configuration?
3) Is there someway to hook the HttpRuntime to override this error and to
continue processing?

[HttpException (0x80070057): Invalid file name for monitoring:
'C:\Inetpub\www root\Proxy\~'. File names for monitoring must have absolute
paths, and no wildcards.]
System.Web.Dire ctoryMonitor.Ad dFileMonitor(St ring file) +429
System.Web.Dire ctoryMonitor.St artMonitoringFi le(String file,
FileChangeEvent Handler callback, String alias) +76
System.Web.File ChangesMonitor. StartMonitoring Path(String alias,
FileChangeEvent Handler callback) +495
System.Web.Cach ing.CacheDepend ency.Init(Boole an isPublic, Boolean
isSensitive, String[] filenamesArg, String[] cachekeysArg, CacheDependency
dependency, DateTime utcStart) +1535
System.Web.Cach ing.CacheDepend ency..ctor(Bool ean isSensitive, String[]
filenames, DateTime utcStart) +50

System.Web.Conf iguration.HttpC onfigurationSys tem.GetCacheDep endencies(Hasht able cachedeps, DateTime utcStart) +151
System.Web.Conf iguration.HttpC onfigurationSys tem.ComposeConf ig(String
reqPath, IHttpMapPath configmap) +697
System.Web.Http Context.GetComp leteConfigRecor d(String reqpath,
IHttpMapPath configmap) +434
System.Web.Http Context.GetComp leteConfig() +49
System.Web.Http Context.GetConf ig(String name) +195
System.Web.Cust omErrors.GetSet tings(HttpConte xt context, Boolean
canThrow) +20
System.Web.Http Response.Report RuntimeError(Ex ception e, Boolean canThrow)
+39
System.Web.Http Runtime.FinishR equest(HttpWork erRequest wr, HttpContext
context, Exception e) +486


Nov 18 '05 #1
1 5583

I duid find a way to solve this problem.That is you have to include the follwoing code in
Application_err or event
the code to be included is

if (Request.Url.To String().IndexO f("~") > 0)
{
Context.ClearEr ror();
Context.Rewrite Path("HttpError 404.aspx");
return;
}
HttpError404.as px is the page u want to redirect.Hope u know that.But this only partially solves the problem.When u give it in the file name u wont get the error.But when it is given in the directory name u cant.If u have any sol. by now lemme know

rs*******@yahoo .com
is my mail id

I am writing a simple reverse proxy using .Net.

The basic design is to capture all traffic (from all URL's) in an
HttpHandler and the respond accordingly.

The problem is that I when a URL is received that contains a "`" character I
get the exception listed above; and the call stack listed below.

Questions;
1) Where can I find more documentation on the FileChangesMoni tor class?
2) Is there anyway to disable the caching via a configuration?
3) Is there someway to hook the HttpRuntime to override this error and to
continue processing?

[HttpException (0x80070057): Invalid file name for monitoring:
'C:\Inetpub\www root\Proxy\~'. File names for monitoring must have absolute
paths, and no wildcards.]
System.Web.Dire ctoryMonitor.Ad dFileMonitor(St ring file) +429
System.Web.Dire ctoryMonitor.St artMonitoringFi le(String file,
FileChangeEvent Handler callback, String alias) +76
System.Web.File ChangesMonitor. StartMonitoring Path(String alias,
FileChangeEvent Handler callback) +495
System.Web.Cach ing.CacheDepend ency.Init(Boole an isPublic, Boolean
isSensitive, String[] filenamesArg, String[] cachekeysArg, CacheDependency
dependency, DateTime utcStart) +1535
System.Web.Cach ing.CacheDepend ency..ctor(Bool ean isSensitive, String[]
filenames, DateTime utcStart) +50

System.Web.Conf iguration.HttpC onfigurationSys tem.GetCacheDep endencies(Hasht able cachedeps, DateTime utcStart) +151
System.Web.Conf iguration.HttpC onfigurationSys tem.ComposeConf ig(String
reqPath, IHttpMapPath configmap) +697
System.Web.Http Context.GetComp leteConfigRecor d(String reqpath,
IHttpMapPath configmap) +434
System.Web.Http Context.GetComp leteConfig() +49
System.Web.Http Context.GetConf ig(String name) +195
System.Web.Cust omErrors.GetSet tings(HttpConte xt context, Boolean
canThrow) +20
System.Web.Http Response.Report RuntimeError(Ex ception e, Boolean canThrow)
+39
System.Web.Http Runtime.FinishR equest(HttpWork erRequest wr, HttpContext
context, Exception e) +486


User submitted from AEWNET (http://www.aewnet.com/)
Nov 19 '05 #2

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

Similar topics

1
3890
by: Ron | last post by:
I am trying to run asp.net pages. The server is accessed via http://sitename/username I have verified it is using port 80 and aspx extensions are configured. But when I run and asp.net page I get the following error: Invalid file name for monitoring: 'E:\'. File names for monitoring must have absolute paths, and no wildcards. Description: An unhandled exception occurred during the
0
1485
by: simpsoro | last post by:
I am trying to run asp.net pages. The server is accessed by students via http://sitename/username I have verified it is using port 80 and aspx extensions are configured. But when I run and asp.net page I get the following error: Invalid file name for monitoring: 'E:\'. File names for monitoring must have absolute paths, and no wildcards. Description: An unhandled exception occurred during the
1
6130
by: Edward Yang | last post by:
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...
0
1621
by: Ron Simpson | last post by:
I am trying to run asp.net pages. The server is accessed via http://sitename/username I have verified it is using port 80 and aspx extensions are configured. But when I run and asp.net page I get the following error: Invalid file name for monitoring: 'E:\'. File names for monitoring must have absolute paths, and no wildcards. Description: An unhandled exception occurred during the
5
2864
by: Jay Ge | last post by:
I searched this issue in internet, but they still cannot solve my issue, so your help/suggestion will be preciated. this page is placed on serverA, and it will touch files on serverB.(but it seems this is not double hop issue.) I use impersonation <identity impersonate="true" userName="domain\username" password="passwd" /> and <authentication mode="Windows"/>. the account "domain\username" is the admin of serverA (I have grant it admin...
11
555
by: Brad Quinn | last post by:
I'm undergoing an audit where my web application is supposed to handle (gracefully) a bunch of garbage being throwns at it. When I use the following url I get an error; http://localhost/myapplication/~Home/Page.aspx where the offending character is the tilde.
5
483
by: Joe | last post by:
I'm getting the following error when trying to call a page on a secure server. I'm not doing any impersonations or file access of any kind. The page is using PayPal and I'm wondering if PayPal has something to do with this. We had to register an api certificate on the server using WinHttpCertCfg. Maybe this is doing something? Access denied to 'D:\WWWRoot\sslserver'. Failed to start monitoring file changes. Description: An unhandled...
0
1390
by: Brian | last post by:
I've deployed a 'URL rewriter' version of our application almost two months ago and it is working great (.NET 1.1, Win2k, IIS5). Since then, I've gotten just FOUR exceptions that look like this: The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of...
35
9365
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from 500000 to 3200000 of a file whose size is say 20MB... how do i request a download which starts directly at 500000th byte... thank u cheers
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9479
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10080
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9942
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8967
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7492
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6733
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2874
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.