Last post Jun 18, 2016 01:49 PM by berhir
Jun 14, 2016 03:40 PM|AndyEd|LINK
This problem does not occur under debug on IIS express, nor did it happen under debug or on Azure in release mode using RC1.
If I decorate a controller with [RequireHttps] linking to it fails within the same site under azure, even though the caller page is also under SSL.
I'm testing on an azurewebsites.net sub-domain name, so a valid SSL certificate exists.
The response is a 404 bounced direct to the browser without my error handler being called in the request pipeline.
Jun 16, 2016 08:54 PM|lyulyok|LINK
Having run into exactly the same problem I was able to find a workaround using this article :http://blog.smarx.com/posts/redirecting-to-https-in-windows-azure-two-methods
. Essentially, created an entry in web.config that is outlined there to non-MVC apps, and took out the [RequireHttps] attribute. Since this is an MVC app, I still would like to know why using the recommended way did not work for RC2 on Azure (works fine on
localhost, and my Cert is valid)
Jun 18, 2016 01:49 PM|berhir|LINK
This is a known issue in RC2. See in the release notes: https://github.com/aspnet/Home/releases/tag/1.0.0-rc2-final
The suggested workaround is to add the following in Startup.ConfgiureServices:
options.ForwardedHeaders = ForwardedHeaders.XForwardedProto;