requirehttps

fails in MVC Preview 2 when applying to AccountController.LogOn

一笑奈何 提交于 2019-12-25 04:39:08
问题 When trying to apply [RequireHttps] to AccountController.Logon in ASP.NET MVC 2 Preview 2 I get the following error : ASP.NET detected invalid characters in the URL. This is because ASP.NET has rewritten my request from http://example.com/admin to https://example.com/account/logon%3FReturnUrl=/admin It is ASP.NET itself that has added ReturnURL (not ASP.NET MVC), but it is the RequireHttps attribute that is redirecting and messing up the URL. The %3F instead of ? is breaking the page. I think

ASP MVC 3 RequireHttps attribute change all links to https

不羁的心 提交于 2019-12-23 09:03:20
问题 I have an ASP MVC 3 website that has a Feedback form and should require SSL. Now, I have an action called Feedback inside a controller called 'ContactUs' that is responsible for viewing and processing the feedback. When I used the [RequireHttps] attribute on that action, it works nice and it changes the URL to "https". However, I noticed that all the links inside my page are now pointing to "https"! As if this attribute had forced the routing engine to apply the same to all links!!! Of course

RequireHttps and routing to https URL

可紊 提交于 2019-12-23 04:30:59
问题 I am using the RequireHttps attribute on most of the actions in my User controller which handles the login and my secure https pages. On my Home Page which is http I have a link to my login page as follows (MVC 4 Razor View):- <a href="@Url.Action("Login", "User")">Login</a> The link correctly goes to the login page with an https address. However, when I look in the IIS log I see there are two entries for the login URL, one on port 80 and one on port 443. Is this an issue I should be

Why does AppHarbor + RequireHttpsAttribute equal frowny-face :(

和自甴很熟 提交于 2019-12-10 12:44:34
问题 First deployment to AppHarbor today. After some initial work getting it to build, I successfully deployed an MVC3 app. There is a problem with using the RequireHttpsAttribute though. I noticed at first that http pages were working fine, but https pages were getting the error that the web page has a redirect loop. I have been meaning to require https for the entire app, so I went and added a global RequireHttpsAttribute filter in global.asax. Now every single page is getting the redirect loop