I've spent some time playing with the recent BizTalk Services CTP SDK (way cool stuff!), and ran into a weird error that perhaps others might run into: Sometimes, but not always, I would get an error when trying to use any of the BizTalk Services WCF extensions, like the relay channel, during initalization.

For example, if I wanted to start the service part of the Echo sample included with the SDK, sometimes I'd get the following exception during the host.Open() call:

Microsoft.ServiceModel.Relay.ServerErrorException: The server had an error while
processing request.
at Microsoft.ServiceModel.Relay.RelayListener.InitiateConnection()
at Microsoft.ServiceModel.Relay.RelayListener.OnOpen(TimeSpan timeout)
at System.ChannelFx.RefcountedCommunicationObject.Open(TimeSpan timeout)
at Microsoft.ServiceModel.Relay.RelayChannelListener.OnOpen(TimeSpan timeout)

at System.ChannelFx.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()
at Microsoft.ServiceModel.Relay.Samples.Program.Main(String[] args) in C:\Pro
gram Files\BizTalk Services SDK\Samples\EchoSample\Service\Program.cs:line 32

I couldn't figure out why this was happening at first because I couldn't always repro it. What I'd do then is just start closing stuff (thinking perhaps it was some sort of resource exhaustion) until it started working again. But then I noticed that whenever this was happening, the Cardspace Card Selector UI, when launched manually through the Control Panel, would fail to start up as well. I would get the following error and then the infospace.exe process would hang in memory until I manually killed it through Task Manager:

Checking the windows Application Log I'd see this:

The Windows CardSpace user interface process failed in its initialization phase. This might be due to an error during the creation of the private desktop. Exception of type 'Microsoft.InfoCards.UIAgentInitializationException' was thrown.

Not very useful, but it was a place to start. I started looking again to see what I had running (all sorts of stuff) and trying stuff out until I found the culprit: Console. I love using Console instead of the regular cmd.exe plain because it is more configurable and has a tabbed interface. Plus, I have configured default shells for both cmd.exe and PowerShell that I can launch quickly with a single keystroke.

For some weird reason, though, it appears that the Cardspace Card Selector User Interface refuses to start on my Windows Server 2003 R2 virtual machine (VPC2007) as long as Console is running. Close Console, and both Cardspace and the BizTalk Services SDK samples start working again perfectly.

No idea why this happens, as the Cardspace UI works just fine even though Console is running on my main Vista machine, but there you go.

 

Technorati tags: ,


Tomas Restrepo

Software developer located in Colombia.