?
Solved

Application_BeginRequest not firing when xxx.aspx file not found (using RewritePath in application)

Posted on 2005-05-05
3
Medium Priority
?
2,227 Views
Last Modified: 2008-01-09
I've been using Application_BeginRequest to call a function to parse the URL and RewritePath to a known .aspx file.  This has been working fine with many ISPs,  but on installing the application on a new ISP,  Application_BeginRequest isn't firing and a 404 error results.

I've had this problem some time ago with a different ISP who fixed it but didn't tell me what they did :-(

I believe there's a setting in Machine.config that enables virtual paths but I've not been able to find any documentation on this.

Any ideas?

This problem is rather urgent and embarrassing,  hence it's worth lots of points -- I would award it more than 500 if I could!

TIA,  Glenn


Further info:
It's a content management application that uses 'friendly' urls and exploits Application_BeginRequest with RewritePath to call the correct skin aspx file,  thus separating form from function.

It's been working fine on loads of different systems and ISPs and it's only ever failed on two separate ISPs,  the earlier one which fixed the problem (and didn't let me know what they did!),  and this new ISP.

It's running framework vn 1.1
0
Comment
Question by:GlennGilbert
2 Comments
 
LVL 3

Author Comment

by:GlennGilbert
ID: 13944980
I've found the answer after a *lot* of digging and I thought I'd share it with everyone.

The problem is a setting on IIS that checks if a file exists before calling Application_BeginRequest.  If this option is set ON,  IIS will throw a 404 error and not fire the Applciation_BeginRequest event.  If it's off,  the event is fired.

This is a setting in IIS:
IIS/Website/Properties/Home Directory/Configuration/Mappings/.aspx/Edit

In IIS6,  Change the setting "Verify that file exists" to OFF
In IIS5,  Change the setting "Check that file exists" to OFF

End of problem.

How do I award the points to myself?
Glenn

0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14123965
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question