Click here to Skip to main content
15,886,199 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Guidance required to show date and time as per user's timezone wise Pin
Richard MacCutchan7-Jan-18 2:43
mveRichard MacCutchan7-Jan-18 2:43 
GeneralRe: Guidance required to show date and time as per user's timezone wise Pin
Mou_kol7-Jan-18 4:48
Mou_kol7-Jan-18 4:48 
GeneralRe: Guidance required to show date and time as per user's timezone wise Pin
Richard MacCutchan7-Jan-18 6:09
mveRichard MacCutchan7-Jan-18 6:09 
Questionhow to prevent csrf attack by using csrf-token Pin
nooshiiin5-Jan-18 18:58
nooshiiin5-Jan-18 18:58 
AnswerRe: how to prevent csrf attack by using csrf-token Pin
debasish mishra8-Jan-18 2:16
professionaldebasish mishra8-Jan-18 2:16 
QuestionBrowser cookie and session cookie Pin
Mou_kol5-Jan-18 0:12
Mou_kol5-Jan-18 0:12 
AnswerRe: Browser cookie and session cookie Pin
F-ES Sitecore5-Jan-18 0:45
professionalF-ES Sitecore5-Jan-18 0:45 
GeneralRe: Browser cookie and session cookie Pin
Mou_kol6-Jan-18 6:12
Mou_kol6-Jan-18 6:12 
GeneralRe: Browser cookie and session cookie Pin
F-ES Sitecore6-Jan-18 6:14
professionalF-ES Sitecore6-Jan-18 6:14 
GeneralRe: Browser cookie and session cookie Pin
Mou_kol6-Jan-18 7:02
Mou_kol6-Jan-18 7:02 
GeneralRe: Browser cookie and session cookie Pin
F-ES Sitecore6-Jan-18 7:07
professionalF-ES Sitecore6-Jan-18 7:07 
GeneralRe: Browser cookie and session cookie Pin
Mou_kol7-Jan-18 1:16
Mou_kol7-Jan-18 1:16 
GeneralRe: Browser cookie and session cookie Pin
F-ES Sitecore7-Jan-18 2:11
professionalF-ES Sitecore7-Jan-18 2:11 
QuestionHow to: Enable default paging in the GridView Web server control Pin
Member 125540292-Jan-18 2:04
Member 125540292-Jan-18 2:04 
AnswerRe: How to: Enable default paging in the GridView Web server control Pin
Member 125540292-Jan-18 5:27
Member 125540292-Jan-18 5:27 
QuestionAsp.net Core 2.0 Coversion of Pdf to Image Pin
Member 1353148227-Dec-17 7:19
Member 1353148227-Dec-17 7:19 
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 

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.