WCF error: Cannot resolve KeyInfo for unwrapping key: KeyInfo ‘SecurityKeyIdentifier

If you are getting an error like : Cannot resolve KeyInfo for unwrapping key: KeyInfo ‘SecurityKeyIdentifier and your have checked that your certificate is in the right store and right place. So this might be the reason. check the binding you have and make sure the negotiateServiceCredential has the same value. By default, it is…

1

Going to Tech Ed China 2007

I am going to attend Tech Ed China 2007 again. I am very excited about it. http://www.microsoft.com/china/technet/teched/speakers/default.mspx  

1

How to pass custom object between WCF client app and custom issued security token provider

There are two options: 1. OperationContext.Current. Pros: This is pretty straightforward and relatively hard to discover.  Cons: This is a thread local storage, and you are invoking a async call, it does not work well. 2. ChannelParameterCollection This is very sneaky. You will need to add the object to channel first in your client app code,                                …

0

Generating user instances in SQL Server is disabled. Use sp_configure ‘user instances enabled’ to generate user instances

If you are getting the following error: “Generating user instances in SQL Server is disabled. Use sp_configure ‘user instances enabled’ to generate user instances” What should I do?   Answer: To fix this, please Open the SQL Server Management Studio Express. This is the downloadable program in the same site where you downloaded the SQL…

0

How to make IIS hosted WCF service work with Card Space using localhost

First let me explain why it does not work. There are three string comparisons done by card space. The information card has Issuer, IssuerEndpointAddress, and IssuerMexAddress. When you hit a web site which requires an information card, in other words, it contains a object tag which has specified the Issuer and Mex address. Comparison 1: CardSpace UI would do a…

1

How to use findstr with regular expression

By default findstr does the comparison with regular expression. However, what surprised me is that the following command does not work.  findstr “abc|def” test.txt when test.txt has only abc in it. According to the online tutorial such as http://www.regular-expressions.info/reference.html, abc|efg should match abc. Why? The reason is pretty simple, findstr does not support the full range of the regular expression. It does…

0

How to change your web site from https://localhost to https://mydomain.com

There are three steps you need to take to make it work.  1. Modify your hosts file under \Windows\System32\drivers\etc\hosts and add the following entry: 127.0.0.1    mydomain.com 2. Turn off your proxy dection from the IE,  Go to Tools->Internet Options->Connection->LAN Settings, uncheck everything 3. Modify your binding in the IIS manager to use mydomain.com instead of localhost…

0

How do I turn on windows authentication in IIS 7

In IIS 6, you can start the IIS manager by typing the inetmgr at the Start->Run windows, and click on the web site, Right click on the web site, go to the directory security, you will have windows authentication check box to click. In IIS 7, it is not the case. Windows Authentication is not…

1

CardSpace: Why can’t i select my personal card

You need to make sure that your personal card contains the required claim types you specified in your client binding. To fix this, try set the required claim types to one of the claims that your personal card has. WSFederationHttpBinding binding = new WSFederationHttpBinding( WSFederationHttpSecurityMode.Message ); // the required claim sections binding.Security.Message.ClaimTypeRequirements.Add( new ClaimTypeRequirement( ClaimTypes.GivenName…

1

Card Space exception: incoming policy failed validation

One possibility is that your binding does not contains required claim types. In your client binding, make sure you have at least one required claims: WSFederationHttpBinding binding = new WSFederationHttpBinding( WSFederationHttpSecurityMode.Message );   // the required claim sections binding.Security.Message.ClaimTypeRequirements.Add( new ClaimTypeRequirement( ClaimTypes.Name ) );   // the optional claim sections binding.Security.Message.ClaimTypeRequirements.Add( new ClaimTypeRequirement( ClaimTypes.Gender, true…

0