Sunday, November 15, 2009

RibbonControls and Visual Studio 2010 Beta

When building an WCF project with Visual Studio 2010 that includes Microsoft Office UI's RibbonControls, the project may not build correctly, even though the same project may have been built correctly under Visual Studio 2008. The error is "Operation is not supported. (Exception HRESULT: 0x80131515)".

To fix this problem, first the file "RibbonControlsLibrary.dll" must be unblocked. Right click on this file in Windows Explorer, and then selec "Properties". On the "General" tab, there is an "Unblock" button near the bottem. Click on the button to unblock it.

Second, do no place "RibbonControlsLibrary.dll" in the GAC. If you have already placed it in the GAC, you will get an error saying that "This assembly is not vetted for safe use by partial trust code". Remove it from the GAC by running "gacutil -u RibbonControlsLibrary" from Windows command line. Then add a reference to the file "RibbonControlsLibrary.dll" in your project directly.

This should make your WPF project build under Windows 2010.

Wednesday, November 4, 2009

CRM 4.0 Email Router Uses Double Escape Sequence When Accessing Exchange Server

Somehow Microsoft's own programmers do not seem to know the behaviors of their own webs server. IIS by default rejects requests with double escape sequence in the request URL. As a result, CRM 4.0 Email Router service may generate a lot of errors in the server's event log when it uses double escape sequences, saying that it was unable to access certain mail boxes on the Exchange 2007 server that it trys to connect to. Oddly enough, tests from the CRM Email Router Configuration Manager succeed every time. But errors in the event log keeps piling up.

The fix is to turn off the IIS rejection of double escape sequence.

Microsoft actually has a knowledge base article that tells us exactly how this is done:

http://support.microsoft.com/kb/942076