I'm occasionally getting this exception in my AppHarbor site:
[InvalidOperationException: The behavior of the AppHarbor loadbalancer changed, it no longer specifies the HTTP_X_FORWARDED_FOR header]
at Premotion.AspNet.AppHarbor.Integration.AppHarborModule.<>c__DisplayClass1.b__0(Object sender, EventArgs args) in C:\inetpub\wwwroot\PremotionAspNetAppHarborIntegration\src\Premotion.AspNet.AppHarbor.Integration\AppHarborIntegrationModule.cs:line 89
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Hi Chris, Thanks for reporting this issue, I am investigating now.
Hmm, according to this http://support.appharbor.com/kb/getting-started/information-about-our-load-balancer the implementation is correct.
Chris, could you please elaborate a bit more about how often this issue occures and if there is a pattern to it? Maybe send a list of all the exception with their timestamp?
Thanks in advance for your info!
There's doesn't seem to be a pattern to it. It's happened on two totally different pages at different times. I'll keep an eye on it to see if it happens more. I'll also check with AppHarbor to see if it's an issue on their end.
Weird, it could be an infrastructure thing at AppHarbor, maybe an misconfigured nginx instance or something.
Please let me know if you learn more.
OK, I've been able to reliably reproduce the issue. It happens whenever there is a HTTP 500 error on the site. I added some custom error pages to my site and I have a controller that intentionally generates an error to test them. On my local machine I get the custom error page as expected, but on AppHarbor I get this error every time.
You can see it here: http://solvora.apphb.com/Home/IntentionalError
Hi Chris, thanks for reproducing this error!
I will investigate and publish a bugfix as soon as possible.
+ intentional exception header to reproduce #7
+ using 404 to reproduce #7
#7 fighting web.config
Candidate fix for #7
After having a few fights with iis and the httpErrors element I managed to reproduced the problem properly.
I have committed a bugfix in the master branche and I have updated the test application.
Would you please be so kind and test the bugfix in your application before I update the NuGet package?
Thanks in advance!
It looks like that fixed it! I republished my app with the new build and it shows the custom error page as it should: http://solvora.apphb.com/Home/IntentionalError
Fixed in version 0.4.0, now available on NuGet.