views:

12

answers:

1

Hello,

Background: We are hosting a .NET 4.0 Windows Workflow activity inside a WCF service on IIS. The server is a Windows 2008 R2 machine.

Problem: The ‘Activity’ fails inside the constructor’s InitializeComponent() call with the following stack trace (XamlObjectWriterException). This problem appears to be machine related – i.e. it works on some machines, but fails on others.

Stack Trace :

at System.Xaml.XamlObjectWriter.WriteEndObject() 
at System.Xaml.XamlObjectWriter.Dispose(Boolean disposing) 
at System.Xaml.XamlWriter.System.IDisposable.Dispose() 
at MyActivity.InitializeComponent() in \MyActivityLib\obj\Debug\MyActivity.g.cs:line 81 

Has anybody found a similar problem and/or know the cause? I found this Microsoft Connect bug, which gives the same error, but they don't seem to have been able to reproduce it reliably, and it was closed before RTM.)

One of our developers could induce this error when hosting on IIS (Windows XP), while the activity ran flawlessly out of a test console app on his machine. He then deleted his source tree and rechecked it out, and the IIS problem appears to have gone away for him. However, trying the same approach (delete source & re-checkout) hasn't fixed our build server / test environment combination.

Thanks

A: 

It turns out that our server was still running .NET 4 Beta 2. Still doesn't explain the problems we had on the developers local machine (definitely running RTM), but oh well - at least it's fixed.

Terence Lewis
Don't forget to mark this as the answer.
Will