I've been ask by the programming department to test deploying one of their app. For all I know about the app, is that it's a webservice wcf code c# for a wpf app. They did tell me that they did try to put the certificate directly in the webservice (to avoid the pain in the ass to register ssl certificate and save them in each client app).
So far no problem with me. But there the little trick.
I've been trying to deploy the thing in localhost (to be sure about the process to do it), and everything is good (did get the success svc loading page with this message ):
blabla success
svcutil.exe http://###deployment.eslan2.local/Service###.svc?wsdl
C#
class Test
{
static void Main()
{
//how to blabla
client.Close();
}
}
but when I try to deploy the webservice on my IIS webserver (ws2K8R2 with IIS7.5), i get this nasty and not really helpfull error message :
Server Error in '/' Application.
The specified network password is not correct.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Cryptography.CryptographicException: The specified network password is not correct.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[CryptographicException: The specified network password is not correct.]
System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) +41
System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromBlob(Byte[] rawData, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx) +0
System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromBlob(Byte[] rawData, Object password, X509KeyStorageFlags keyStorageFlags) +335
System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData) +101
Effect.ServiceModel.ServiceBehaviorHandlerAttribute.ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) +623
[ServiceModelException: An error occurs during service management.]
Effect.ServiceModel.ServiceBehaviorHandlerAttribute.ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) +1782
System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +3565
System.ServiceModel.ServiceHostBase.InitializeRuntime() +82
System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +64
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +789
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +287
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1132
I've spent 3 days looking around the net to find an answer, but nothing valuable so far.
I've been thinking it's not from my server but the code that error came from.