How to force my ashx HttpHandler to use SSLhttp://forums.asp.net/t/1718944.aspx/1?How+to+force+my+ashx+HttpHandler+to+use+SSLSat, 15 Oct 2011 16:16:52 -040017189444590411http://forums.asp.net/p/1718944/4590411.aspx/1?How+to+force+my+ashx+HttpHandler+to+use+SSLHow to force my ashx HttpHandler to use SSL <p>I have an asp.net mvc blog application which has an ashx httphandler mainly to be used by my windows live writer to create new posts. I want to force it to use ssl when using this handler because authentication is involve in calling any method in the handler. How can I do that?</p> 2011-09-09T14:08:17-04:004599127http://forums.asp.net/p/1718944/4599127.aspx/1?Re+How+to+force+my+ashx+HttpHandler+to+use+SSLRe: How to force my ashx HttpHandler to use SSL <p>I am not certain of what you are asking.&nbsp; Are you looking for a coding solution?&nbsp; Or a server side config change?&nbsp; Or simply how to configure Windows Live Writer?</p> <p>Here are a couple of options:&nbsp;</p> <ol> <li>Use server variables to verify SSL is being used. If SSL is on do nothing, if not, redirect the execution to a HTTPS connection (server.redirect or similar).&nbsp;&nbsp; There are two variables that come to mind. <ol> <li><strong>HTTPS</strong> this variable has a value of &quot;on&quot; if SSL is used. </li><li><strong>SERVER_PORT</strong> this varible will have a value of 443 is SSL is used on the standard port. </li></ol> </li><li>Configure IIS to <strong>Require SSL</strong> on the ashx file or the directory the handler is in.&nbsp; This is a simple check box in the IIS Manager UI under the SSL settings. </li></ol> <p>If you are asking about how to configure Windows Live Writer this is the wrong forum.</p> 2011-09-15T17:55:00-04:004640377http://forums.asp.net/p/1718944/4640377.aspx/1?Re+How+to+force+my+ashx+HttpHandler+to+use+SSLRe: How to force my ashx HttpHandler to use SSL <p>Thanks. am using a shared hosting plan so I dont have access to the ssl UI. I think I would go with coding it.</p> 2011-10-15T16:16:52-04:00