Browsed by
Tag: WCF

.NET CryptographicException “Keyset does not exist”

.NET CryptographicException “Keyset does not exist”

Came across this error today when updating a new certificate used in a WCF service for digital signatures. Turns out the solution, as always, was pretty simple: give correct permissions to the private key file. Open the certificate manager and locate the correct certificate. Right click and navigate to: All Tasks -> Manage Private Keys. Change the file permissions so the IIS user can read. Read more on stackoverflow.com.

Keyset does not exist error in .NET application

Keyset does not exist error in .NET application

When using WCF to communicate with a web service that required a client certificate, I couldn’t get the solution to run unless I started Visual Studio as an administrator. The error that I got was : System.Security.Cryptography.CryptographicException Keyset does not exist I knew full well the private key did exist (you can see this in MMC > Certificates). So it had to be a security related issue, seeing that when I run it as admin I have no issues. After…

Read More Read More

Intercept raw soap messages in code using WCF

Intercept raw soap messages in code using WCF

I faced the problem today that I needed to intercept the soap messages that are send to a webservice using WCF. To make things more complicated I needed to have them as a variable in my code and most of the stuff I found online was how to enable tracing/logging. A very good example to enable tracing is found on this website. After some extensive google’ing I came across this post. The post does an excellent job of describing how…

Read More Read More