Last post Sep 10, 2013 11:48 AM by taetsu
Sep 06, 2013 04:16 AM|taetsu|LINK
I'm trying to do HMAC-SHA256 authentication for my WCF webservices.
After much reading about HMAC-SHA on the web, I started to apply them into my project.
Now that I've successfully encrypt the message on the client-side, but how do I go about authenticating the request before the request entering the WebMethods?
I suppose I should add a HttpModule to tap into the Init() event and do validation there?
But as soon as I added the HttpModule to my WCF project and configure the web.config, I'm getting error saying:
An error occurred while receiving the HTTP response to http://localhost:61884/MyService.svc.
This could be due to the service endpoint binding not using the HTTP protocol.
This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down).
See server logs for more details.
Am I right about using HttpModule in this context?
Sep 09, 2013 07:52 AM|Illeris|LINK
I'm not familiar with this authentication method. Does this help you : http://msdn.microsoft.com/en-us/library/windowsazure/hh289317.aspx
Sep 10, 2013 10:39 AM|kushalrdalal|LINK
Can you post your config file for service?
Sep 10, 2013 11:48 AM|taetsu|LINK
I figured that HttpModule doesn't work for self-hosted WCF service which launched from VisualStudio.
After hosting the WCF service within IIS, HttpModule is hitting the breakpoint at BeginRequest() now.
Hopefully this tip helps others in future.