ssl - why Adding certificate based authentication on rest service hosted as windows service, not able to start service? -


i have created wcf rest sevice , hosted windows service. took reference following post.

http://www.codeproject.com/tips/1009004/wcf-restful-on-windows-service-host

now trying add certificate based authentication on it.

i added following section inside config file. note : followed following msdn link adding authetication https://msdn.microsoft.com/en-us/library/ff648360.aspx

<bindings>   <wshttpbinding>     <binding name="wshttpendpointbinding">       <security>         <message clientcredentialtype="certificate" />       </security>     </binding>   </wshttpbinding> </bindings> 

and

 <servicebehaviors>         <behavior name="servicebehavior">           <servicemetadata httpgetenabled="true" />           <servicedebug includeexceptiondetailinfaults="false" />           <servicecredentials>             <servicecertificate findvalue="cn=tempcertserver" />           </servicecredentials>         </behavior>       </servicebehaviors> 

i installed windows service , when trying start it. throws error.

enter image description here

i removed following section

<servicebehaviors>     <behavior name="servicebehavior">       <servicemetadata httpgetenabled="true" />       <servicedebug includeexceptiondetailinfaults="false" />       <servicecredentials>         <servicecertificate findvalue="cn=tempcertserver" />       </servicecredentials>     </behavior>   </servicebehaviors> 

and error disappear. certification didint work.

what reason? doing correctly adding certificate based authentication rest service hosted windows service?

i got solution.i made following change   <servicedebug includeexceptiondetailinfaults="true" />         saw exception in event view logs. service not able find certificate, hence not started.again created certificate , works.  creating certificate follow following link closely. 

https://msdn.microsoft.com/en-us/library/ff648498.aspx


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -