{"id":662,"date":"2011-03-03T09:53:03","date_gmt":"2011-03-03T09:53:03","guid":{"rendered":"http:\/\/www.kozeniauskas.com\/itblog\/?p=662"},"modified":"2011-03-03T09:54:25","modified_gmt":"2011-03-03T09:54:25","slug":"cannot-load-the-x-509-certificate-identity-specified-in-the-configuration","status":"publish","type":"post","link":"http:\/\/www.kozeniauskas.com\/itblog\/2011\/03\/03\/cannot-load-the-x-509-certificate-identity-specified-in-the-configuration\/","title":{"rendered":"Cannot load the X.509 certificate identity specified in the configuration"},"content":{"rendered":"<p>You have a WCF application and trying to run it but it would not start.<br \/>\nIn application event log you see Error event logged with Event ID 0:<br \/>\n<em>2011-02-02 13:46:52 [(null)] [ApplicationName] [FATAL] &#8211;<\/em><br \/>\n<em>&#8212; Exception data associated with the Log entry &#8212;System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration.<\/em><br \/>\n<em>at System.ServiceModel.Description.ConfigLoader.LoadIdentity(IdentityElement element)<\/em><br \/>\n<em>at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)<\/em><br \/>\n<em>at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)<\/em><br \/>\n<em>at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)<\/em><br \/>\n<em>at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName)<\/em><br \/>\n<em>at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()<\/em><br \/>\n<em>at System.ServiceModel.EndpointTrait`1.CreateChannelFactory()<\/em><br \/>\n<em>at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)<\/em><br \/>\n<em>at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()<\/em><br \/>\n<em>at System.ServiceModel.ClientBase`1..ctor()<\/em><br \/>\n<!--more--><br \/>\nObviously the problem is with the certificate but the question is which one.<br \/>\nIf application was developed by someone else it might be the case that developers were using certificates that don&#8217;t exist on your system, so you need to identify them.<br \/>\nWCF applications come with config file which are plain text. Usually they are in the same location as the application itself but with config extension. So if your WCF application name is <strong>ApplicationName.exe<\/strong>the config file should be <strong>ApplicationName.exe.config.<br \/>\n<\/strong><br \/>\nOpen that file in notepad and look for <strong>&lt;identity&gt;<br \/>\n<\/strong>If the application is looking for the certificate or certificates\u00a0then you should see something like:<strong><br \/>\n&lt;certificateReference storeName=&#8221;My&#8221; storeLocation=&#8221;LocalMachine&#8221; x509FindType=&#8221;FindBySubjectName&#8221; findValue=&#8221;*.certificate.local&#8221;\/&gt;<br \/>\n<\/strong>In this line the certificate that the application is looking is called <strong>*.certificate.local. <\/strong>There might be more than one line like this but with different certificate names. Open management console and see if that certificate or certificates exists on your computer and are valid. If the certificate is not on the computer there are 2 posible option that you can try:<br \/>\nFirst: locate and install the missing certificate<br \/>\nSecond: delete the line in the config file that is looking for the certificate. When deleting toy need to delete not only that one line but also <strong>&lt;identity&gt;<\/strong>before and <strong>&lt;\/identity&gt;<\/strong> after the line.<\/p>\n<p>Also you could try to change the name of the certificate in config file to the one that exists on your system and is valid but I have not tried this option.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You have a WCF application and trying to run it but it would not start. In application event log you see Error event logged with Event ID 0: 2011-02-02 13:46:52 [(null)] [ApplicationName] [FATAL] &#8211; &#8212; Exception data associated with the Log entry &#8212;System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration. at System.ServiceModel.Description.ConfigLoader.LoadIdentity(IdentityElement [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/662"}],"collection":[{"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/comments?post=662"}],"version-history":[{"count":2,"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/662\/revisions"}],"predecessor-version":[{"id":665,"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/posts\/662\/revisions\/665"}],"wp:attachment":[{"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/media?parent=662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/categories?post=662"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kozeniauskas.com\/itblog\/wp-json\/wp\/v2\/tags?post=662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}