Questions tagged [requirehttps]

14 questions
14
votes
5 answers

MVC RequireHttps and redirect if not https

I've read thru many of the questions on ASP.NET MVC [RequireHttps] - but can't find the answer to this question: How do you make the [RequireHttps] attribute switch the url to https if it was not https to start with? I have this code: public…
JK.
  • 21,477
  • 35
  • 135
  • 214
9
votes
1 answer

Why does AppHarbor + RequireHttpsAttribute equal frowny-face :(

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…
danludwig
  • 46,965
  • 25
  • 159
  • 237
7
votes
2 answers

ASP MVC 3 RequireHttps attribute change all links to https

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]…
Yousi
  • 811
  • 3
  • 12
  • 26
7
votes
3 answers

ASP.NET MVC [RequireHttps] - return to http

Once you place [RequireHttps] on an action and user switches from HTTP to HTTPS, all subsequent links will stay HTTPS... Is there a way to switch back to HTTP ?
zam6ak
  • 7,229
  • 11
  • 46
  • 84
3
votes
1 answer

ASP.NET MVC: OutputCache attribute disregards RequireHttps attribute?

I have an ASP.NET MVC 3 application with an action that uses both the RequireHttps and OutputCache attributes: [RequireHttps] [OutputCache(Duration = 14400, VaryByCustom = "CurrentUser"] public ActionResult VersionB() { return View(); } When I…
Tom Lokhorst
  • 13,658
  • 5
  • 55
  • 71
2
votes
2 answers

Why doesn't this load into https?

In asp.net mvc 3 I have a site which has an ssl certificate, and runs just fine in https. The only page exposed is the logon page. For whatever reason, it does not load in https. Here is my relevant code (will post more on request if I left…
Travis J
  • 81,153
  • 41
  • 202
  • 273
1
vote
0 answers

Redirect between HTTP and HTTPS with [RequireHttps] failed with IIS Express

I'm tried using IIS Express. ( change from previous use Local IIS ) . I have redirect problem. For example step 1: go to login page https://localhost/user/index , i got "ERR_CONNECTION_RESET" step 2: when I change in type direct url to…
PimB
  • 65
  • 8
1
vote
2 answers

Requirehttps for DEVELOPMENT and LIVE websites

I have some ASP .NET MVC4 website which I have to put first to DEVELOPMENT place to test. And development website doesn't have SSL but the LIVE has it. Well. I have to use [Requirehttps] inside of 20 controllers and I cannot comment it every time…
NoWar
  • 36,338
  • 80
  • 323
  • 498
0
votes
1 answer

Asp.Net MVC RequireHttpsAttribute or Response Redirect doesn't work in IIS6

I am using RequireHttps attribute to redirect Http to Https. It works fine in my dev machine which has IIS7.5 installed. However, it doesn't work in IIS 6 in Windows Server 2003. Thus, I have got Http error 403.4. I have tried to use…
huang
  • 1
0
votes
1 answer

ASP.NET MVC RequireHttps Page Not Found

I am trying to add the RequireHttps tag to a controller action but when I try to navigate to it I get a page not found error when I try: https://localhost/MVCDemo3_4/Home/Index2 or http://localhost/MVCDemo3_4/Home/Index2 The Http one tries to…
user3739190
  • 111
  • 2
  • 9
0
votes
1 answer

ASP.NET MVC RequireHttps not available

I'm using System.Web.MVC v2.0.50727 and can't seem to apply the RequireHttpsAttribute. I can use [OutputCache(...)] for instance, but if I try to use [RequireHttps] I get a missing assembly error. Is there a later version of mvc 2 out there that…
Paul
  • 3
  • 1
0
votes
2 answers

fails in MVC Preview 2 when applying to AccountController.LogOn

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…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
0
votes
3 answers

RequireHttps and routing to https URL

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):-
cw_dev
  • 465
  • 1
  • 12
  • 27
0
votes
1 answer

MVC3 RequireHTTPS Simple

Im running an MVC3 app within an IIS7.5 instance on a winsvr2008 R2 box. Now if i set RequireHttps either globally or on each class, my url never gets rewritten at all, in fact it changes nothing? Im using my own custom forms authentication module…
P0DD3R5
  • 236
  • 1
  • 3
  • 11