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?
I am not certain of what you are asking. Are you looking for a coding solution? Or a server side config change? Or simply how to configure Windows Live Writer?
Here are a couple of options:
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). There are two variables that come to mind.
HTTPS this variable has a value of "on" if SSL is used.
SERVER_PORT this varible will have a value of 443 is SSL is used on the standard port.
Configure IIS to Require SSL on the ashx file or the directory the handler is in. This is a simple check box in the IIS Manager UI under the SSL settings.
If you are asking about how to configure Windows Live Writer this is the wrong forum.
Lou Prete [MSFT]
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
edwardkorank...
Member
14 Points
18 Posts
How to force my ashx HttpHandler to use SSL
Sep 09, 2011 02:08 PM|LINK
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?
lprete
Member
385 Points
57 Posts
Microsoft
Re: How to force my ashx HttpHandler to use SSL
Sep 15, 2011 05:55 PM|LINK
I am not certain of what you are asking. Are you looking for a coding solution? Or a server side config change? Or simply how to configure Windows Live Writer?
Here are a couple of options:
If you are asking about how to configure Windows Live Writer this is the wrong forum.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
edwardkorank...
Member
14 Points
18 Posts
Re: How to force my ashx HttpHandler to use SSL
Oct 15, 2011 04:16 PM|LINK
Thanks. am using a shared hosting plan so I dont have access to the ssl UI. I think I would go with coding it.