1

I can force a controller / action in ASP .NET MVC to use HTTPS.

How can I do other way around? i.e., I do not want my public web-pages to be accessible via HTTPS. Reason being: they are use external scripts and images, it gives not-so-good cross across https signs.

Do I need to use custom attrib?

F1 F1 ..

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
effkay
  • 794
  • 2
  • 17
  • 36
  • 1
    possible duplicate of [How do I do the OPPOSITE of \[RequireHttps(Redirect=true)\] in ASP.NET MVC](http://stackoverflow.com/questions/1158214/how-do-i-do-the-opposite-of-requirehttpsredirect-true-in-asp-net-mvc) – Brandon Jun 17 '11 at 16:11
  • [This link](http://stackoverflow.com/questions/6206019/how-to-force-http-or-https-with-url-actiontcontroller) maybe of your help. – Jayesh Jun 17 '11 at 16:13

1 Answers1

1

I'm using UrlRouting module in IIS7 to force SSL / no SSL traffic. I prefer IIS configuration as any changes do not impact the application source code.

Jakub Konecki
  • 45,581
  • 7
  • 87
  • 126