Click here to Skip to main content
15,884,739 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Asp.net Core 2.0 Coversion of Pdf to Image Pin
Afzaal Ahmad Zeeshan27-Dec-17 8:19
professionalAfzaal Ahmad Zeeshan27-Dec-17 8:19 
AnswerRe: Asp.net Core 2.0 Coversion of Pdf to Image Pin
Richard Deeming8-Jan-18 6:41
mveRichard Deeming8-Jan-18 6:41 
QuestionRemote Desktop Pin
NazifullahOsmani26-Dec-17 22:50
NazifullahOsmani26-Dec-17 22:50 
AnswerRe: Remote Desktop Pin
Nathan Minier27-Dec-17 6:40
professionalNathan Minier27-Dec-17 6:40 
Questionhow to create Date to Date Report in asp.net using c# Pin
Member 1278069726-Dec-17 17:15
Member 1278069726-Dec-17 17:15 
AnswerRe: how to create Date to Date Report in asp.net using c# Pin
Afzaal Ahmad Zeeshan27-Dec-17 8:21
professionalAfzaal Ahmad Zeeshan27-Dec-17 8:21 
QuestionHow to implement https for mvc site Pin
Mou_kol22-Dec-17 5:10
Mou_kol22-Dec-17 5:10 
AnswerRe: How to implement https for mvc site Pin
A_Griffin22-Dec-17 22:43
A_Griffin22-Dec-17 22:43 
It doesn't matter what kind of site you're running - MVC or Winforms - https is https and is a server (IIS) configuration issue - though you may need to ensure that any references to http in your CSS or JavaScript code are redirected accordingly - eg @imports in CSS or, for example, if you use a JavaScript library with an external source you may need to update the reference (or your users will see an "insecure content" warning in their browsers.)

You may also need to update callback references in, for example, Paypal if you use their Instant Payment Notifications, and in Google Analytics.

Otherwise you can enforce https within web.config - but you may want to ensure everything is working first. You can obtain free SSL certificates from Lets Encrypt[^] - if you're on a Windows server, I quite like the Certify[^] manager for getting and installing them.

There no real need to test it locally - as I say, you can test it on https while leaving plain http in place, until you're happy it's all working, and then enforce https (See below). If you really want to, you can though - but exactly how depends on your local setup. You'll need to open your router, and point a domain to your machine and bind that in ISS... etc etc.

Here is what I put in web.config to enforce https:

HTML
<system.webServer>
   	<rewrite>
	  <rules>
		<rule name="httpsredirect" stopProcessing="true">
		  <match url="(.*)" />
		  <conditions>
			<add input="{HTTPS}" pattern="off" ignoreCase="true" />
		  </conditions>
		  <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
		</rule>
	  </rules>
	</rewrite>
</system.webServer>

GeneralRe: How to implement https for mvc site Pin
Nathan Minier27-Dec-17 6:44
professionalNathan Minier27-Dec-17 6:44 
GeneralRe: How to implement https for mvc site Pin
A_Griffin27-Dec-17 7:08
A_Griffin27-Dec-17 7:08 
GeneralRe: How to implement https for mvc site Pin
Nathan Minier27-Dec-17 7:19
professionalNathan Minier27-Dec-17 7:19 
SuggestionRe: How to implement https for mvc site Pin
Richard Deeming8-Jan-18 6:44
mveRichard Deeming8-Jan-18 6:44 
GeneralRe: How to implement https for mvc site Pin
A_Griffin8-Jan-18 6:46
A_Griffin8-Jan-18 6:46 
QuestionASP.Net MVC:How to implement Elmah in separate project Pin
Mou_kol22-Dec-17 5:01
Mou_kol22-Dec-17 5:01 
AnswerRe: ASP.Net MVC:How to implement Elmah in separate project Pin
jkirkerx22-Dec-17 10:12
professionaljkirkerx22-Dec-17 10:12 
Questionint retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Lay_Kay21-Dec-17 3:39
Lay_Kay21-Dec-17 3:39 
AnswerRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
David Mujica21-Dec-17 4:54
David Mujica21-Dec-17 4:54 
GeneralRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Lay_Kay21-Dec-17 17:50
Lay_Kay21-Dec-17 17:50 
SuggestionRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Richard Deeming22-Dec-17 2:08
mveRichard Deeming22-Dec-17 2:08 
AnswerRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Richard Deeming22-Dec-17 2:11
mveRichard Deeming22-Dec-17 2:11 
GeneralRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Lay_Kay22-Dec-17 5:19
Lay_Kay22-Dec-17 5:19 
AnswerRe: int retryattempts = Convert.ToInt32(dr["retryattempts"]); Pin
Richard MacCutchan21-Dec-17 5:18
mveRichard MacCutchan21-Dec-17 5:18 
QuestionHow to ensure user either checks a box or fills out the form? Pin
samflex18-Dec-17 7:48
samflex18-Dec-17 7:48 
QuestionAdvice on Partial View Pin
sunsher17-Dec-17 2:37
sunsher17-Dec-17 2:37 
Questionmaintain position DIV on Postback Pin
Member 1317428015-Dec-17 5:42
Member 1317428015-Dec-17 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.