473,660 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

httpModule...

I have written an httpModule for use in our test environment. If a user goes
to http://testserver/SomeApplication/MyPage.aspx it will resolve to the
latest version of that application deployed:
http://testserver/SomeApplication.1.0.10.0/MyPage.aspx, for instance.

Problem is, the httpModule doesn't get called because
http://testserver/SomeApplication doesn't exist. I assume this is because
IIS is spitting it back, but I am not sure. Can someone help me figure out a
decent way of getting that to work? Do I need an ISAPI filter instead?
Nov 18 '05 #1
1 1644
Ryan Cromwell wrote:
I have written an httpModule for use in our test environment. If a user goes
to http://testserver/SomeApplication/MyPage.aspx it will resolve to the
latest version of that application deployed:
http://testserver/SomeApplication.1.0.10.0/MyPage.aspx, for instance.

Problem is, the httpModule doesn't get called because
http://testserver/SomeApplication doesn't exist. I assume this is because
IIS is spitting it back, but I am not sure. Can someone help me figure out a
decent way of getting that to work? Do I need an ISAPI filter instead?


Because the file does not exist the worker process never gets a chance
to play in the web request. Well the directory surely doesn't exist so
you don't even get the default mapped file. IIS just throughs back the
404 error. Note that that error is a htm page. You can configure this
to use your own code. So I will bet that you can map the 404 error in
IIS "Custom Errors" tab to your HttpModule code. But you will have to
implement your HttpModule as a .ashx file. Now I haven't done this
specifically I think this will work. Tell me if this works for you.

Make sure that you check the url string and still send back the normal
404 error content when a visitor hits a web site not in the url of interest.
Nov 18 '05 #2

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

Similar topics

0
1553
by: Bruce B | last post by:
Hi group, I'm experiencing some extreme weirdness over the last week with IIS related to it's Mappings and how .NET is behaving. I can't explain the behavior as it seems very random. Our app has about 50 file extensions that we map in IIS and handle in our HTTPHandler to catch the reference and then lookup the correct content from a database. In addition, we do some magic in a HTTPModule to rewrite paths for file types we don't...
2
3431
by: Rob Mayo | last post by:
What I'm trying to do is Create an ASP.Net app that has both Windows-authenticated users and Anonymous users. The idea is this: When authenticated users attempt to access the site, their credentials are passed to the Request, and I use the DOMAIN\USER value via the AUTH_USER server variable to access their accounts. These people would never have to log in to the app, only their machines on the network. When anonymous users attempt to...
7
2573
by: nail | last post by:
Folks, I develop a HttpModule and it works correct, but one problem is occurs. After I register the httpmodule in the web.config, my pages (not testing http://localhost/site but http://my_machine_name/site) show problems when refresh the page. I guess some kind of javascript problems with the postback methods. Someone has any idea how can i fix it? Thanks
4
3907
by: Danny W | last post by:
Hi There! Is it possible to use HttpModule to replace the built-in ASP.NET Session object? I want to write a HttpModule that will handle storing and retrieving of session values from an external database. For example, when a page set values to Session object such as Session("somevar")=1 then I want my HttpModule to get notified and store the value into the external database. The same for "getting" the variable, I want my own...
2
2132
by: Simon-Pierre Jarry | last post by:
Hi, I created a custom HttpModule for managing the security of my application. in "Init" sub, I regsiter the events doing that : Public Sub Init(ByVal context As System.Web.HttpApplication) Implements IHttpModule.Init httpApp = context
2
4580
by: walter | last post by:
Hi there, I know there is pool of HttpApplications, and for each request coming in, HttpRuntime will dedicate one from pool to serve the request. My questions are : 1. since HttpModule is plug into the process, does each instance of HttpApplication keep its own set of HttpModule instance or HttpModules are shared among all HttpApplication instances? 2. In case of HttpApplication keep its own set of HttpModule, does the HttpModule...
1
1898
by: Faraz | last post by:
Hi everyone, I am running into a slight problem. My understanding is that a custom HttpModule will run for every request made to the server, regardless of the extension. I do not experience this behavior. My module only runs for the extensions handled by the aspnet_isapi.dll. Here are my sequence of steps: 1) Create the HttpModule 2) Compile and drop dll in the webApp bin directory.
0
1130
by: mattdev1000 | last post by:
Hello, I have an HttpModule that uses a lazy fetch to a secondary tier for calculating some values (the calculation is can be multisecond in the worse case). The HttpModule spins up a thread to listen for a response from this 2nd tier and will cache the results in a large table for service subsequent requests. I notice that the HttpModule will unload from time to time and realize this is normal behavior but was wondering if there was...
3
1833
by: Joseph Geretz | last post by:
I'm implementing a web application whose purpose in life is to act as a data conduit. Data is posted to my Web app in XML format, my application examines the data and forwards it onward by posting it to the appropriate upstream server. Since transaction processing is largely identical regardless of the transaction details (these will be handled by an upstream sever) I'm thinking of implementing my application as an HttpModule. But I'm...
0
8428
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
8341
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,...
0
8851
Oralloy
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...
0
8754
jinu1996
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...
0
7362
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...
0
5650
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();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1984
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.