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 1 5585
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/) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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
|
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...
|
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
|
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...
| |
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.
|
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...
|
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...
|
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
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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...
|
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...
|
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();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |