Topics: Service Factory Modeling Edition Forum
Apr 28, 2010 at 4:42 AM

I'm having a problem generating a simple project from scratch using the 2010 version.  The generated code files all have the following error after the attempted code generation “An unexpected exception has occurred while generating code. Check the Error List Window.” The Error List contains the error "Exception of type 'System.OutOfMemoryException' was thrown."



Apr 28, 2010 at 11:04 AM


Thanks for trying out this Beta version. We are investigating this issue and will be fixed for the final version.



Apr 28, 2010 at 3:36 PM

One question, do you have both VS2008 and 2010 installed on your box? Any version of EntLib perhaps?



Apr 28, 2010 at 7:45 PM
Edited Apr 28, 2010 at 7:47 PM

Hey Norm, also, do you have BizTalk or SharePoint tools installed?

We're only able to repro this on one box right now and are struggling a bit to track it down. Any other info would help.


Apr 28, 2010 at 10:53 PM

Hi Don/Hernan...So here is a list of what I have installed

  • VS 2008
  • VS 2010
  • Slightly modified version of the WSSF-ME installed for VS 2008
  • WSSF-ME Beta installed for VS 2010
  • Office tools for VS 2008 & VS 2010
  • EntLib 4.1 and 5.0RTM installed
  • Windows XS SP3 (with 04GB - can only see 3GB)
  • No BizTalk
  • SharePoint tools for VS 2010
  • Smart Client Development (April 2001) for VS 2010


Hope that helps.

Apr 28, 2010 at 11:56 PM

Hi Norm,

Do you have RedGate .NET Reflector on your machine? If yes, the following would help resolve this issue:

1. Double click the Reflector exe.

2. Click on Tools --> Integration Options.

3. Uncheck the VS 2010 and VS 2008 options from the popup.

4. Click OK to exit.

After these steps, open your WSSF solutions again or open Visual Studio 2010 to create a new WSSF solution.

Let us know if this works.






Apr 29, 2010 at 3:46 AM

Hi Meenaksi:

That was it.  Will keep testing.





Apr 29, 2010 at 6:43 PM

Great! Let us know if you find anything else. We will get this documented in CodePlex.

May 7, 2010 at 4:42 PM
Edited May 7, 2010 at 4:44 PM

Same issue, same solution.

Thanks, Alexander

May 13, 2010 at 11:11 AM
Edited May 13, 2010 at 11:14 AM

I downloaded latest version of service factory. I created new models for service and data contracts. When I tried to generate code, System.OutOfMemoryException is thrown.


Windows Server 2008 R2 (x64)
Visual Studio 2010 Premium (version 10.0.30319.1 RTMRel)
Visual Studio 2010 SDK installed


Any idea how to fix it? Thanks


Tomas Bako

May 14, 2010 at 7:49 AM

Did you try validation before generating code? Throws any error?

I know that it might be ovbious from reading this thread but did you check if you have installed Reflector with VS integration enabled?

Thanks for the feedback,


May 14, 2010 at 7:56 AM
Edited May 14, 2010 at 8:11 AM

Yes, I tried validation before generating code. No errors was thrown. My Reflector has VS integration disabled.

This error occurs during generating code from newly created models and from upgraded model too.


May 14, 2010 at 2:15 PM

We are also attempting to use VS2010 with the latest Web Service Factory, which we use heavily in 2008. It seems to work fine, albeit more slowly. It simply takes more time to validate than its 2008 equivalent.

However, I've been forced to go back to using 2008 because the "validation" step of the VS2010 WSSF crashes after a period of time. Note that it does a validation every time the model is saved or the code is being generated.

After a while, I see what the problem is. All you have to do is watch your Task Manager memory consumption for devenv.exe. Every time you run the validation it eats up a few dozen (or more) megabytes of memory. Once I hit about 550,000 of both "Mem Usage" and "VM Size" VS2010 chugs for a bit and then crashes with the aforementioned exception. I can't run the "big" service contract diagram at all, because it has so many operations (web methods) that it crashes before it finishes.

It appears there's a memory leak issue during the validation process. As I said, I am building a new app with quite a few web services/methods, and the memory issue is flatly preventing me from using 2010. Unfortunately, I don't have the option of upgrading operating systems (32bit XP Pro) to add more than 3GB of memory to alleviate the problem... though the problem is really the memory leak, not my machine, I think.

May 14, 2010 at 5:51 PM

Hi TSutchel,

How many model elements do you have on your service contract?

Let us know so that we can check it.






May 14, 2010 at 6:57 PM

It happens for both large and small models. But our largest (ported from 2008) service contract model has 3 services, 3 service contracts, ~40 operations, and ~70 messages. The data contract model has ~60 elements (data contracts, collections, and fault contracts).  WSSF 2010 was not able to validate this model at all without crashing with the out-of-memory error. At first I thought it might be an internal incompatibility with the model XML format.

I began to rebuild the model from scratch using WSSF 2010, but I began to experience the memory error as I worked (and thus restarted VS repeatedly). After watching Task Manager for a while, I realized that every time it validated, it consumed more memory until it finally ran out. The "from scratch" model had only a fraction... only 8 or so operations.

What I did like as I was refactoring was the ability to have a model reference another model, which I don't remember being possible in 2008. This wouldn't be a factor in my 2008-port since it doesn't do this. But it might be a contributing factor in the memory issue with my 2010 refactor (and I really dread the idea of hand-porting the whole model).

May 15, 2010 at 12:12 AM

Thanks for the information TSutchel. We will keep you posted on this.

May 15, 2010 at 3:43 AM


We already identified this memory issue and we'll provide a fix in a future refresh version. Stay tunned to this thread si we'll post it here when the fix becomes available.

Regarding your custom code migration I would recommend to hold on until we publish this fix.



May 17, 2010 at 10:21 PM

Hello Hernan,

I'm also experiencing this issue.  I have disabled the reflector integration and restarted VS 2010.  I still get the System.OutOfMemoryException even with a very small sample model of ~ 3 datacontracts, 1 service, 1 operation.  I'm evaluating this factory as an approach that we could adopt in our organization.  Could you provide a timeline of when the fix will be published?  I need to present my findings back to my team this week.



May 18, 2010 at 3:52 AM

Hi Ryan,

It really suprise me that with such a small model you get the OOM error. We always checked this issue with large models.

Did you check your free memory before and after getting this error?

Regarding the fix, I cannot give the exact date but it should be out anytime soon after the RTM which should be published on the next days.



May 18, 2010 at 2:30 PM

Hi Hernan,

Thanks for your prompt reply.  I was also surprised to see this error with such a small model.  I went through a similar exercise lastnight on my home 64bit Win7 (4GB RAM) PC.  I was able to create a model and generate the code without the OOM error.  However, on my work 32bit WinXP (2GB RAM) PC, I receive the error with all apps shutdown and after a fresh reboot.  I also disabled all other extensions to minimize potential impacts and reduce the memory footprint.  After walking through the steps several times, I only notice one difference between the Win7 and WinXp install.  On XP, when installing GAT/GAX from the online extension manager, I'm prompted for credentials.  After selecting my domain account, it appears to install and requires a restart VS 2010.  After completing those steps, the extension does not show as installed in the extension manager.  I had to manually download the GAT/GAX 2010 extensions from the visualstudiogallery.msdn.microsoft.com.  I then double click the vsix to install.  After manually installing all the vsix files, I have the following extensions installed:

GAT 2010 v2.0.20406.0
GAX 2010 v2.0.20406.0
WSSF 2010 v4.0
WSSF 2010 DC Model v4.0.0.0
WSSF 2010 Host Designer v4.0.0.0
WSSF 2010 SC Model v4.0.0.0

I can create service contracts, datacontracts in the visual designer.  I can run the factory to create create a WCF implementation and all the associated projects.  I can link the data model project mapping up to the implementation.  The only piece that does not work is when right clicking the design surface of a servicecontract or datacontract and selecting "generate code".

Here is the data from the Task Manager performance tab:
Physical Memory:
Total - 2039740, Available - 855968, System Cache - 1001500
Kernal Memory:
Total - 219504, Paged - 124288, Nonpaged - 95660

Any other assistance or guidance you could provide would be appreciated.


May 18, 2010 at 2:46 PM

This has just startet happening to me today.

All I did was add one extra value to an enum in a data contract. When I press 'generate code' I get 29

Error 18 Exception of type 'System.OutOfMemoryException' was thrown.  0 0 


May 20, 2010 at 9:36 AM

I fixed it by:

- Updrading to the full GAT and GAX 2010 from the RC

- Disabling the reflector integration

May 20, 2010 at 3:26 PM


Can you provide the location where you downloaded the full GAT and GAX 2010.  I want to verify it is the same version I currently have installed.  Thanks.

May 20, 2010 at 10:58 PM

There u go :)




PS: Only GAX is required for running WSSF 2010.

May 20, 2010 at 11:20 PM

I have same issue, and none of the steps that were proposed helped me. I have latest GAX 2010 and unchecked the reflector settings. I have 4Gb of RAM on my machine but it is 32 bit. This article here claims that there is a difference: http://msdn.microsoft.com/en-us/library/ff407021(VS.100).aspx

Alex K.

May 20, 2010 at 11:33 PM

Good link Alex!

As I wrote above, this fix will be out soon. I will post it here as soon as go public.



May 26, 2010 at 2:21 AM

Hey guys,

The RTm version is out with this issue fixed;

Bits:  http://visualstudiogallery.msdn.microsoft.com/en-us/8c6ea683-acf2-4881-bb05-3c3252992bfe

Src:  http://servicefactory.codeplex.com/releases/view/44037



May 26, 2010 at 1:50 PM

I installed the most recent GAT and WSSF and converted my project from 2008 to 2010. I still get the same out-of-memory issue in 2010.  I don't have this problem in 2008 when I perform a Validate on the model. My service contract model has a total of 753 model elements (according to the validation).

May 26, 2010 at 2:06 PM

Hi Hernan,

I just installed the RTM bits you posted, verified .NET reflector add-in was disabled, and it worked!  My small sample model generated the code without issue.  Thanks for working this issue.



May 27, 2010 at 12:50 AM

Hi TS, can you describe your memory size and if you have that amount of elements in DC or SC? (or both). You can also verify that you have the latest code updated on May 21st.



May 30, 2010 at 3:54 AM


Can you please tell me how to install the 4.0 Version of WSSF2010 published on May 22, 2010? It seems that I would have to uninstall the older version before I can install this newer one. However, I don't know where I can uninstall the older one. The Control Panel doesn't have a wssf2010 there, or is it under a different name? I am using Windows 7 Ultimate and Visual Studio 2010 Ultimate. Thanks!

May 30, 2010 at 4:07 AM

Never mind, I have found it. It's under Visual Studio / Tools / Extension Manager. Thanks!

Jun 8, 2010 at 5:26 PM
Edited Jun 8, 2010 at 5:27 PM


I'm also receiving System.OutOfMemoryExceptions when generating code and/or validating models in the Web Service Software Factory in Visual Studio 2010.

My system setup is:
Windows XP Professional SP3 (32 bit)
Memory 3.25GB

The Dev. Environment is:
Visual Studio 2010 (10.0.30319.1)
GAX 2010 (2.0.20406.0)
Web Service Software Factory (version 4)

All source code is .NET 3.5.
All source has been converted to VS 2010 from a previously working VS 2008 environment.

The steps I take to generate the error are:

- I open Visual Studio 2010 (memory usage of devenv.exe is 121MB)
- I open my solution file in VS2010. The solution contains multiple projects that were converted from VS 2008 to VS 2010, including a project with multiple Service Factory models. (memory usage of devenv.exe spikes to 429MB but settles around 395MB)
- I open a one of the service contract models. The model I've been using has eight service operations. (memory usage of devenv.exe is 398MB)
- I run the "Validate All" command. (memory usage of devenv.exe is 495MB and doesn't drop when the task has successfully finished).
- I run "Generate All Code". (memory usage of devenv.exe is 611MB and doesn't drop  when the task has successfully finished).
- I re-run the "Validate All" command. (memory usage of devenv.exe is 720MB and doesn't drop when the task has successfully finished).
- I re-run the "Generate All Code" command. (memory usage of devenv.exe is 742MB when the error message "Exception has been thrown by the target of an invocation. Exception of type 'System.OutOfMemoryException' was thrown.).

I can regenerate this error by either re-running the "Validate All" command or the "Generate All Code" command, and it doesn't matter whether I do this on the service contract model or it's associated data contract model.




Jun 11, 2010 at 1:08 AM

Hi Tim,

I see that you are using the source version so if you don;t want to wait to the next refresh version that may fix this issue, you can try this quicl fix (notice that for large models perf will be poor but mem should be fine).

  1. Open GenericSerializer class in Modeling.Common project.
  2. Look for "GenericXmlSerializer" private function (line 320) and insert this line at the beginning: return serializerFactory.CreateSerializer(type, (Type[])extraTypes);
  3. You can remove the rest of the code in that function.

Let me know if that fixes the memory issue.




Jun 11, 2010 at 4:56 PM
Hi Hernan, Thanks for the help, unfortunately your fix didn't work for me. The GetXmlSerializer function doesn't exist in my source so I instead added the snippet to the GetXmlSerializer function which is at line 320 and returns an XmlSerializer. The source compiled and installed OK, but I now get the following error when I open the model: "Unable to cast object of type 'System.Collections.Generic.List`1[System.Type]' to type 'System.Type[]'." Also, if I attempt to validate or generate code the memory still rises (leaks). Kind regards, Tim
Jun 13, 2010 at 4:11 PM


I'm a bit confuse by your comment regarding the missing GenericXmlSerializer function at line 320 of the source code. I want to check that you are using the latest code.

You should have a function like:

private static XmlSerializer GetXmlSerializer(Type type, ICollection<Type> extraTypes) {  .. code here }

In this function, you can comment its content and leave only this line:

return serializerFactory.CreateSerializer(type, (Type[])

Let me know what you get, thanks



Jun 16, 2010 at 5:09 PM

Hi Hernan,

Sorry for my delay in responding, and thanks again for your help.

I've double-checked and i'm definitely using the current source code. The release is 44037.

The function that i'm modifying looks like this:

private static XmlSerializer GetXmlSerializer(Type type, ICollection<Type> extraTypes)
	if (extraTypes == null ||
		extraTypes.Count == 0)
		return CreateSerializer(type);

	XmlSerializer serializer = null;
	List<Type> etypes = new List<Type>(extraTypes);
	StringBuilder b = new StringBuilder();
	etypes.ForEach(t => b.Append(t.FullName));
	int key = b.ToString().GetHashCode();
	if (!serializerCache.TryGetValue(key, out serializer))
		// known bug for serializerFactory that will not cache with types parameter.
		serializer = new XmlSerializer(type, etypes.ToArray()); // serializerFactory.CreateSerializer(type, extraTypes);
		if (!serializerCache.TryAdd(key, serializer))
			Trace.TraceWarning(Microsoft.Practices.Modeling.Common.Properties.Resources.CannotCacheXmlSerializer, type.FullName);
		return serializer;

	return serializer;


And after I apply your fix the function looks like this:

private static XmlSerializer GetXmlSerializer(Type type, ICollection<Type> extraTypes)
	return serializerFactory.CreateSerializer(type, (Type[])extraTypes);


Once I compile and install your fix I receive the following error when opening a model: "Unable to cast object of type 'System.Collections.Generic.List`1[System.Type]' to type 'System.Type[]'."

And unfortunately I still receive the unwanted System.OutOfMemoryException after validating/compiling the model once or twice.



Jun 23, 2010 at 1:02 PM

Hi Tim,

Try this:

if (extraTypes == null || extraTypes.Count == 0)
       return CreateSerializer(type);

 return serializerFactory.CreateSerializer(type, extraTypes.ToArray());

You can also try to close all apps other than VS to free as much memory as you can (until a fix is out).




Jun 24, 2010 at 3:16 PM
Hi Hernan, Adding the above code fixed the errors when opening models, however the memory leak continues and the System.OutOfMemoryException is still thrown after a couple of validation/code generations. I am able to work around the memory leak by validating or generating the code for my model once, and then closing and reopening VS2010. I need to close and reopen VS as simply closing the solution does not free up memory. Obviously this isn't ideal, it's also a show-stopper for us moving forward with VS 2010 as we rely quite heavily on the service factory. I'm looking forward to the next WSSF drop :) Regards, Tim
Jun 25, 2010 at 1:31 AM

Thanks Tim, I will post an update here as soon as a new drop is out.



Jul 8, 2010 at 4:42 PM
Hi Hernan, Do you guys have an ETA on the new drop by chance? Thanks, Tim
Jul 9, 2010 at 10:14 PM
<bump> - encountering a similar issue but it validates just fine...throws OOM when attempting to generate. Not sure why it should be going OOM as the working set size is hitting, max, 500MB.
Jul 9, 2010 at 11:46 PM

Hi Nathayan,

How big is your model (SC/DC) ?  How much memory do you have?



PS: Tim, we still don;t have an ETA on a new drop but I will work on a hot fix so you may update your factory codebase and solve thi issue.


Jul 10, 2010 at 12:21 AM
It's a single contract, two operations, each with a single request/response message with a placeholder string primitive element. The machine has 12GB RAM...it's not exactly hurting.

On Fri, Jul 9, 2010 at 3:46 PM, hernandelahitte <notifications@codeplex.com> wrote:

From: hernandelahitte

Hi Nathayan,

How big is your model (SC/DC) ?  How much memory do you have?



PS: Tim, we still don;t have an ETA on a new drop but I will work on a hot fix so you may update your factory codebase and solve thi issue.


Read the full discussion online.

To add a post to this discussion, reply to this email (servicefactory@discussions.codeplex.com)

To start a new discussion for this project, email servicefactory@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Aug 9, 2010 at 9:36 PM
hernandelahitte wrote:

Hi Tim,

Try this:

if (extraTypes == null || extraTypes.Count == 0)
       return CreateSerializer(type);

 return serializerFactory.CreateSerializer(type, extraTypes.ToArray());

You can also try to close all apps other than VS to free as much memory as you can (until a fix is out).




Hi Hernan

Im having a problem trying to aplicate your fix

The first thing : extraTypes don't have ToArray() method. so i just leave it like before "return serializerFactory.CreateSerializer(type, (Type[])extraTypes);" after compiling successfull and reinstalled the Vsix generated, the modeling interface start to respond very very slowly can't do anything.

im using the lastest source code at this date.

Any help welcome.

Aug 11, 2010 at 4:33 AM
Jose, We are about to publish a beta refresh version that should fix this memory issue and other reported bugs. Stay tunned for the next days and I will update this thread with news. Regards, Hernan
Aug 12, 2010 at 4:38 PM

Finally a new Beta "refresh"version is out that should address this memory issue and others fixes.

Please feel free to check if this problem is solved downloading the vsix from here:


Remember to uninstall any previous version before installing it.

Any feedback is greatly welcome.



Aug 13, 2010 at 5:16 PM
Edited Aug 13, 2010 at 7:47 PM

Great! im going to test it right now. I let you know if i found a problem.

Edit: I tried to "Validate All" a huge model we have with like 50-60 operations, and our VS 2010 ended Crashing. I tried 3 times same result.

Aug 14, 2010 at 9:45 PM

Hi Jose,

Thanks for the quick feedback.

Can you specify the memory% at the time of the crash?

Did you try with simple model Validate?

If possible, it would be great if we can test that model and see any particular problem.


Aug 16, 2010 at 8:53 AM

Hello Hernan,

i'm having the same problem as Jose.

When I click on "Validate All", VS 2010 needs around 100Megs memory more each time.

We have a service contract model with 15 operations. No xsd schemas and no custom data contracts - only primitive message types.



Aug 16, 2010 at 3:06 PM
Edited Aug 16, 2010 at 3:54 PM
hernandelahitte wrote:

Hi Jose,

Thanks for the quick feedback.

Can you specify the memory% at the time of the crash?

Did you try with simple model Validate?

If possible, it would be great if we can test that model and see any particular problem.


Hi Hernan.

I Don't think i could send you a working* model because is using many classes for input and output messages. but i can tell you that every operation use the same servicecontract and i don't have XSD messages. I tried to validate another servicecontract with 11 operations ended successful but devenv.exe memory usage increased around 45% after the validation VS started with 320mb. and ended with 562mb. Also the memory after the validation is not being cleared. I hope that help.

Edit: I did another test with the big model (60 operations) VS started with 260mb with the service contract model opened and i tried only to "Validate All" but VS crashed at 80% memory system usage (on a 4g ram machine) , and VS was using around 980mb.

PS: Im sorry for my bad English :)

Aug 24, 2010 at 4:40 PM

In WSSF's source code, in DoValidate(...) in  ConfigurableObjectValidator.cs if the FileConfigurationSource object is disposed, WSSF 2010 does not seem to have any issues with Memory Exceptions and it is able to validate and generate code for large models. I tried this out in models using around 20 operations using lots of collections(20-30) in their data contracts and I noticed devenv.exe uses much less memory( ~500MB less) than before. Hope this helps!

protected override void DoValidate(T objectToValidate, object currentTarget, string key, ValidationResults validationResults)
            if (objectToValidate != null)
                //    Ignore objects than have already been validated.
                if (IsValidated(objectToValidate))

                Type targetType = objectToValidate.GetType();

                //P.K. disposing of FileConfigurationSource
                using (FileConfigurationSource fs = new FileConfigurationSource(TargetConfigurationFile))
                    Validator v = ValidationFactory.CreateValidator(targetType, targetRuleset, fs);
                    v.Validate(objectToValidate, validationResults);

                    Debug.WriteLine(String.Format(CultureInfo.CurrentUICulture, "{0} {1}", objectToValidate.ToString(), validationResults.IsValid ? "Succeeded" : "Failed"));

Aug 25, 2010 at 4:57 PM

Thanks for this great finding. We'll investigate and add it to the upcomning final version of the refresh that will be out very soon.



Aug 26, 2010 at 11:20 AM

Increasing the size of the virtual memory on my machine solved the problem. When validating SCs, Visual Studio took ~1GB of the available virtual memory and no error were generated. BTW, VS didn't released this memory.

Aug 30, 2010 at 6:33 PM

For all of you that are following this thread, there's a new updated that should cover all memory issues described here (check home page for latest download).



Sep 10, 2010 at 3:33 PM

Hi Hernan,

Sorry that i've been absent from this discussion recently, I had an MSDN support call logged and was working with them to attempt to resolve this issue. They have pointed me back to the Community Forum as they have stated that the memory leak is caused by WSSF.

I tested the new version released (WSSF2010-08-27-update.vsix) today and it still seams to be leaking memory when Validating or Generating code from the model. The big difference between the two functions (Validate All vs. Generate All) is that Generate All immediately causes Exceptions in the Error List no matter how big the model or how much memory VS is consuming.

I can email you screenshots of the error if this helps.



Sep 10, 2010 at 8:08 PM

Hi Tim,

Thanks for the feedback and it will be good if you can send me screenshots and also some test project to repro this, along with your current memory/OS settings.



Sep 16, 2010 at 11:50 AM

Hi Hernan,

I think I've managed to fix the issue... After you emailed stating that you could no longer replicate the issue I started to look locally. I uninstalled all extensions and re-added only those needed by the WSSF. I then ran my tests and everything worked!

I'm not sure what was causing this issue, but the extensions I have installed now on my working system are:

- Architecture Tools Extension Project Templates
- Domain Specific Language Designer
- Domain Specific Language Designer Wizard
- Enterprise Library v5 Configuration Editor
- GAX 2010
- Web Service Software Factory 2010
- Web Service Software Factory 2010 DC Model
- Web Service Software Factory 2010 Host Designer
- Web Service Software Factory 2010 SC Model

The two extensions that existed before but that I haven't added back are:

- Process Template Editor
- Productivity Power Tools

I'm not sure whether the issue was a conflict with one of the above extensions, or whether the process of uninstalling/reinstalling the extensions fixed the issue. If I have a chance I will look into this further, but for the moment I'm happy to have a stable and working environment.

Thanks again for your help with this.


Sep 16, 2010 at 2:35 PM

Thanks Tim for sharing this information. As I told you on our offline email posts, I could not repro this issue under a similar environment (XP SP3 + 1GB RAM) and same extensions so that suggested something in particular with these extensions or installation as you could de verify.

Regards and thanks for the feedback,


May 27, 2011 at 8:50 PM

So what happened? did anyone fix this? I still have this issue. I am using WSSF source code from just before 11/12/20010. Not sure how to check if the source code is after the update talked about in this thread, but it should be the production version from around that time. The only changes made are to add our File headers into all of the code templates and to flatten the structure a little bit. I have not had to use WSSF for a few months, The Services i am using this on are "old" and stable but I need to add some more services and I keep gettintg the out of memory exception.

I also get a number of other wierd behaviors:

First I get 42 errors just opening the solution: Error 1 There is an error in XML document (3, 4).
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.  0 0 

On the Datacontracts the order property seems to get lost, either not saving or being wiped out by some process. Same is true for my collections, the collection type will not persist, or something wipes it out. So it fails validation.

On the Service contract diagram when I select a message there are no properties displayed in the properties window. If I try to validate then I get a errormessage about the is wrapped property. which I cant fix because no properties are available.

ErrorMessage: Error 208 The Message 'AddUserRequest' cannot have the property 'IsWrapped' set to false and contain more than one Message Part. 

I dont think any of these are real errors. For example when I open the files in notepad the order number can be seen in the xml.  e.g from the contracts xml  &lt;Order&gt;0&lt;/Order&gt;&#xD;&#xA;  next field &lt;Order&gt;1&lt;/Order&gt;&#xD;&#xA;


Any Help apreciated

thanks Noel

May 27, 2011 at 10:30 PM

Hi Noel,

According to what you have described, I suggest to get the latest soruce code (Jan-2011, http://servicefactory.codeplex.com/releases/view/44037) so you can get all the fixes. However in you case, you don't seem to get the memory error discussed in this thread.

Anyway, I would give the latest code a try so you can reinstall and avoid any side effect of any change from your 2010 version.

May 27, 2011 at 11:22 PM

That is a serious bummer. I was hoping this was fixed prior to the codeI used from 11/2010. I will have to go thru and figure out what changes I made to the factory, and reapply them to the latest drop. To be clear however I am getting the out of memory exceptions as well as the other behavior described in this thread. http://servicefactory.codeplex.com/discussions/72322 

Thanks Noel

May 31, 2011 at 2:43 AM


I'm very sorry for this but I hope that the latest version will fix these issues. If you can wait a bit more, a new and open version fo the factory will be released that will include these and other fixes as well.

If you cannot wait any longer you can still try the mentioned version above. I cannot give an exact shipping date but should be out soon.



Jun 17, 2011 at 6:09 PM

I took your advice and updated to a later version of the source code. I reapplied our changes, recompiled and started using the new factory. This fixed our out of memory exception. It did not immediatly fix our other issues mentioned above. But thankfully, they fixed themselves a few days later. I have no idea what else may have happened to my environment to fix this.

Thanks for your help