So my environment is C# asp.net sitefinity webforms / mvc / webapi hybrid.
I have an application pool in IIS 7 sitting behind an Amazon elb.
I have a site foo.com in IIS. I have added an application to foo.com called bar.
So my other site can be accessed by foo.com/bar.
These two sites work fine (for the most part). But sometimes when I access the same url
that belongs to foo.com/bar/* I will get a 404 error, I hit enter on the browser address bar
and it shows again. The 404s are hard to replicate some times I get a page rendered, some times I get a 404.
The thing is the 404 page I get is from foo.com, not foo.com/bar.
So it looks like sometimes foo.com is trying to resolve the url instead of foo.com/bar resolving the url.
I noticed that https traffic coming into the elb is sent to my application as http, so maybe the elb does something funny some times but not others?
Anyway, to troubleshoot I want my application at foo.com to ignore all url requests to foo.com/bar, so if i still get 404s I at least want the 404 page from the sub application (foo.com/bar).
So I am thinking of adding this rule to foo.com web.config
<rule name="Ignore bar" stopProcessing="true">
<match url="^.*foo.com/bar/.*" />
<action type="None" />
</rule>
But I'm unsure what the action does.
What does the none do? My intention is to have foo.com ignore the url and have foo.com/bar get the url if the regex is matched.
foo.com/bar is in test mode but foo.com is a live site, so I don't want to break anything.
btw I don't get 404s to foo.com/bar/* on my dev or staging environments (where the IIS applications are setup in teh same format as live).
The main difference seems be be the Amazon environment, but I could be wrong.
So will my rule work? Or is there a better way?
Edit: I don't know if this is related, but on my amazon instances sitefinty shows I have some HTTP PUT errors (when the elb I guess is trying to PUT something to my sub application (foo.com/bar), the error is a timeout).
Edit 2: When trying a Get call to a WebApi method (to foo.com/bar) on https I always get a 404 from foo.com. But the same url on http and I get the expected data, this seems to be consistently reproducible.