Last Updated: February 25, 2016
· analogj

Amazon EC2 + DotNetOpenAuth + Elastic Beanstalk = Url Rewrite Hell (fix)

This is the fix for the DotNetOpenAuth.AspNet module not working on an Amazon ec2 instance that was published out using elastic beanstalk. The web deploy folder + url rewriting rules that amazon places in the web config confuse the module and it dies. The following issue https://github.com/DotNetOpenAuth/DotNetOpenAuth/issues/35 in github references it, but no fix is avaliable there at this time.

I found the following fix on Amazon's forums:

You can deploy your project to the root and then we won't put any IIS URL rewrite rules in the web.config. In Visual Studio right click on your project and select "Package/Publish Settings" and then in the field "IIS Web site/application name to use on the destination server:" change it from "Default Web Site/<yourapp>_deployed" to just "Default Web Site/".

By the way, questions about Visual Studio deployment are more likely to
be answered faster in the AWS .NET Forums.

Hope that helps


from https://forums.aws.amazon.com/thread.jspa?messageID=330957