WorkflowCompiler Error

  • Thread starter Thread starter Anderson Imes (Mary Kay, Inc.)
  • Start date Start date
A

Anderson Imes (Mary Kay, Inc.)

I am using the WorkflowCompiler to compile xoml workflows at runtime into DLL
files. This has been working great, but lately after upgrading to .NET 3.5
(it seems - possibly this is unrelated) sporradically I get the following
error:

System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt. at
System.Workflow.ComponentModel.Compiler.WorkflowCompilerInternal.Compile(WorkflowCompilerParameters
parameters, String[] allFiles) at
System.Workflow.ComponentModel.Compiler.WorkflowCompiler.Compile(WorkflowCompilerParameters
parameters, String[] files) at
MaryKay.CRM.BusinessLayer.WorkflowUtil.CompileWorkflowXoml(String xoml) in
C:\Projects\FrontOffice\SAM-CRM\Current\Service
Interface\MaryKay.CRM.Services\WorkflowUtil.cs:line 127

This is inconsistent and nearly impossible to debug (since it appears to
happen inside the .NET Framework). We've rebooted the server, done other
things and nothing seems to consistently resolve the issue - it just comes
and goes.

If I don't hear back from anyone on the newsgroups, I'll open an incident
with Microsoft.

Thanks in advance for your help.
 
Hello Anderson Imes (Mary Kay, Inc.) Anderson Imes (Mary Kay,,

are u compiling .NET 2.0 WFs or 3.5 ones?


---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


A> I am using the WorkflowCompiler to compile xoml workflows at runtime
A> into DLL files. This has been working great, but lately after
A> upgrading to .NET 3.5 (it seems - possibly this is unrelated)
A> sporradically I get the following error:
A>
 
I'm not sure I understand the question.

..NET 3.0 introduced workflows to the framework and .NET 3.5 added a few
activities (WCF related activities). As far as I can tell, the XML that
represents the workflows is identical to before I upgraded to .NET 3.5. Even
creating new workflows in VS 2008 gives me the same XML in the xoml files as
it did when I was using the addin for VS 2005.

I'm only using those activities that were available in .NET 3.0 - we've not
taken advantage of the .NET 3.5 ones. These are pretty simple state machine
workflows.

I must stress that I am using the WorkflowCompiler type to compile these
workflows at runtime. I am not precompiling them. We do this so that we
have the flexibility to change business rules post-deployment. We also opted
to use the WorkflowCompiler rather than the LoadFromXML method of the
workflow runtime for performance. I say this to clarify that this is not a
problem compiling workflows in Visual Studio, but rather manually using C#.

I hope this answers your question.
 
We recently ran into this same issue although it had nothing to do with
workflows.
A web service compiled against 2.0 that generates some .pdfs via crystal
reports that had been running fine for a few years starting dying with this
same error after updating the server with 2.0 sp1 , 3.0 & 3.5. Our fix was
to do an 'emergency' upgrade of the service to 3.5.



"Anderson Imes (Mary Kay, Inc.)" <Anderson Imes (Mary Kay,
Inc.)@discussions.microsoft.com> wrote in message
news:[email protected]...
 
Back
Top