IIS 7 and Above
Application Request Routing (ARR)
Why some sites return HTTP 404 some don't?
Last post Jun 14, 2018 11:00 AM by flaneder
Jun 01, 2018 02:43 PM|flaneder|LINK
I want to add a load balancer to an existing asp.net project using Application Request Routing. So I made myself familiar with the concepts and created a local
After typing localhost multiple times in any browser, I can see that load balancing (weighted round robin) is working fine. It's alternating between 1. and 2. website.
The problem I'm facing is a 404 Error on both websites.
I already tried the following:
Installing and enabling Failed Request Tracing Rules (on local IIS): URL Rewriting is working properly i think.
Failed Request Log for www.google.com:
google drive, unzip and open xml in e.g. IE for better view
Create Server Farm without automatic creation of URL Rewrite rules
(selecting No and create own URL Rewrite rule)
Change "Managed Pipeline Mode"-setting of Applcation Pool from
Integrated to Classic
Healthcheck on other Websites I have absolutly no clue why it's working on Git-websites
and why facebook is returning a 400 error code.
Enabling/disabling proxy (IIS-Manager -> Application Request Routing Cache -> Server Proxy Settings...)
I don't know what i could do next, so I appreciate any help. Thanks.
Jun 01, 2018 11:56 PM|Rovastar|LINK
Jun 04, 2018 08:51 AM|flaneder|LINK
Thanks for the fast reply! That's the actual problem i have. I totally misunderstood how ARR works under the hood.
Instead of following the instruction to your solution (which would probably work) i was able to find a advanced setting when adding a server to the server farm. You can specify a host name.
Now all health checks for all websites pass (i changed nothing else). But when i enter the same URL which i used in the health check (http://localhost/) in any browser i still get a 404 error.
Did i misunderstood something again? Or is this just a bug?
Jun 07, 2018 07:14 AM|deepakpanchal10|LINK
Instead of using Google.com as a server, Try to make a test with the servers on your work place.
If you just type the URL with localhost in browser to access the page then it will not able to find it because no such page existed.
This is the reason you get 404 error.
Jun 14, 2018 11:00 AM|flaneder|LINK
thanks for pointing out my issue in simple words.
But is there no option to map a server to a hostname?
1. A request comes in
2. The loadbalancer of ARR chooses google.com as next server
3. ARR saved a host for google.com (which is www.google.com) before and changes host in HTTP message from "localhost" to "www.google.com"
4. ARR forwards request to google.com server
5. No 404 Error occurs
I'm just curious and don't know if this would have any use in a real server setup.