HttpModule doesn't intercept POST to url (IIS 5.1) - iis

I have a simple web site (localhost/test) in IIS 5.1 with only a HttpModule and one aspx page.
When I browse the aspx page, the HttpModule works ok.
A POST with soapUI to the url of the aspx page (localhost/test/default.aspx) also works.
But a POST to the url of the web site (localhost/test) is not intercepted by the HttpModule.
What can I do to let the HttpModule react on all POST messages to the site.
Sorry when this is a beginner's question, but several days ago this worked on IIS 7.5 on another machine - has it got anything to do with the version of IIS?

You need to configure IIS to send all requests through ASP.Net by adding a wildcard mapping.

Related

Custom 404 error page for stopped websites on IIS

When you stop a website on IIS and you try to surf to the binded URL, you get a general 404 error page. As one would expect.
But is there a way to edit this page/or set a custom page?
As far as I know, if you stop the site, that means the IIS will not listen the IIS site's port.
So the request will not send to the IIS, IIS will not return any response to the client. The server refused the connection.
In my opinion, there is no way to set the a custom page by IIS.

IIS returns error code 403 in response header and no error page

My setup:
Windows Server 2012
IIS 8.5
SharePoint 2013
The SharePoint site is configured to requeire client certificate. If the user has no valid certificate or the password was wrong IIS returns error code 403 in response header. I would like IIS to return a custom error page instead where I could guide the user how to fix the issue.
There are just to many options where I can configure error pages. Which is the right one?
In IIS I have three possible sites to configure.
Default Web Site
My web application
My web aplication port 443
Custom errors in web.config
Error Pages in IIS
.Net Error Pages in IIS
I have tried some of these options but with no success. Can anybody help me?
Just edit the web.config file in your Visual Studio solution, modify the customErrors section and then check the file into Github to trigger a new deployment.
If you don't use VS, then find your web.config file. Worst case scenario you can edit it directly.

IIS route requests between two sites by cookie

I have the following issue :
How to route requests to different IIS sites by some cookie value ?
Main feature of the solution could be a simplest implementation because this is a temporary solution.
I have IIS v. 6.2

Can asp.net HttpModule forward requests to the asp.dll?

What I'm trying to achieve:
Intercept requests for .asp files using an asp.net application
then re-write the url to something search engine friendly
then pass the request onto the asp.dll to handle the request.
How Im trying to acheive it:
I'm trying to get intelligencia url re-writing working for a classic asp application by
changing the IIS mapping for the website so that .asp extensions are handled by an asp.net application.
The intelligencia asp.net url re-writer then rewrites the url.
The requested .asp page is then forwarded to the asp.dll for processing. Can this bit be done? Any ideas?
My limitations:
Shared hosting account so I can't install isapi filters on the server.
Does it sound like something that could be done by writing an HTTPModule?
I've considered 301 redirect instead but am concerned about google ranking problems.
A .NET HttpModule cannot forward requests to Classic ASP in II6 because of the way the pipeline works. By the time your .NET module executes, you are in the ASP.NET handler and cannot transfer to the ASP handler.
IIS7 has the Integrated Pipeline, which would allow you to have a .NET HttpModule re-write the request to the Classic ASP handler.
You could have a custom 404 handler that clears the 404 status from the response and does a Server.Transfer or Server.Execute your page. The only thing is that you can't pass querystring parameters, so you page would need to parse the request and pull out the variables by hand.
I use a modified version of Smart404 to handle SEO friendly urls, moved files, etc. They call the feature "virtual_aliases".

IIS 7.0 Multiple Domain Site Bindings

I've got three web sites each with its own domain going to my one Windows Server 2008 IIS 7.0 web server.
example1.com
example2.com
example3.com
The site bindings for each:
IIS 7.0 Site Bindings example1.com http://img371.imageshack.us/img371/4215/example1pf4.gif
IIS 7.0 Site Bindings example2.com http://img371.imageshack.us/img371/2567/example2xx0.gif
IIS 7.0 Site Bindings example3.com http://img266.imageshack.us/img266/8186/example3rh9.gif
When I navigate to example1.com, then I see my example1 web site.
When I navigate to example2.com, then I see my example2 web site.
But, when I navigate to example3.com, I see my example1 web site--not the example3 web site I expect.
What's going on? Why might example2.com work, but example3.com fail?
Issue resolved!
I removed and then recreated the example3.com web site within IIS and it's now working.
I didn't change anything. It either originally had a simple typo or the act of recreating it just happened to fix a hiccup within IIS.
It's stopped working again after I setup additional redirects within IIS forcing web sites to use sub domains:
http://example1.com/ redirects to http://www.example1.com/
I've again removed and then recreated the example3.com web sites; I've reset IIS; I've rebooted the server. It's still not working correctly.
I've figured it out. It's not an IIS issue. It's a DNS issue.
The example3.com traffic is for some reason directed to a web server at a different company. THEY serve up a page with only an HTML frame on it. That frame loads a page with the address http://example3.example1.com. That's what I need to handle on MY web server.
I would validate that you have example3.com pointing to the proper location on disk. Also ensure that it is not stopped.
The fallback to example1 is due to the binding entry with no header value.

Resources