Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8080735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:30:14+00:00 2026-06-05T16:30:14+00:00

We have a .NET 4, WPF, WCF, EF 4, SQL 2008 application. One of

  • 0

We have a .NET 4, WPF, WCF, EF 4, SQL 2008 application. One of our EF models is highly relational and in the case I’m describing could and probably does contain cycles. I’ve been asked to troubleshoot a case in the field where all of a sudden data from this STE EF model quit showing up in the WPF client. Upon closer examination, I found that the IIS W3WP process crashes when trying to retrieve (serialize) the STE EF object graph. I used Debug Diagnostics to capture the crash.

When I looked at the generated crash report, I discovered it was a stack overflow exception (how appropriate). The stack trace in the crash report is rather large, but the top of the stack looks something like:

System.Xml.XmlBaseWriter.StartElement(System.String ByRef, System.String, System.String, System.Xml.XmlDictionaryString) 
System.Xml.XmlBaseWriter.WriteStartElement(System.String, System.Xml.XmlDictionaryString, System.Xml.XmlDictionaryString) 
System.Runtime.Serialization.XmlWriterDelegator.WriteStartElement(System.String, System.Xml.XmlDictionaryString, System.Xml.XmlDictionaryString) 
DynamicClass.WriteXXXDataToXml(System.Runtime.Serialization.XmlWriterDelegator, System.Object, System.Runtime.Serialization.XmlObjectSerializerWriteContext, System.Runtime.Serialization.ClassDataContract) 
System.Runtime.Serialization.ClassDataContract.WriteXmlValue(System.Runtime.Serialization.XmlWriterDelegator, System.Object, System.Runtime.Serialization.XmlObjectSerializerWriteContext) 
System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(System.Runtime.Serialization.DataContract, System.Runtime.Serialization.XmlWriterDelegator, System.Object, System.RuntimeTypeHandle) 
System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(System.Runtime.Serialization.XmlWriterDelegator, System.Object, Boolean, Boolean, Int32, System.RuntimeTypeHandle) 
System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(System.Runtime.Serialization.XmlWriterDelegator, System.Object, Boolean, Boolean, Int32, System.RuntimeTypeHandle) 

What makes exceptionally odd is that when the WCF service is hosted in Visual Studio and I run from the dev environment, the serialization works perfectly, and I get data on the client.

Could this be resolved by IIS settings? Why would it work with Visual Studio’s dev IIS, but not with the production IIS?

I’m not sure what is causing this problem or why the serializer is even barfing?

Should I try another means of WCF serialization w/ STE EF4?

Any input is appreciated.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:30:15+00:00Added an answer on June 5, 2026 at 4:30 pm

    (By default) IIS limits stack size of managed threads to 256 KB. I don’t know about dev web server but the default stack size for managed threads is 1 MB. In addition if you are running on a 64-bit machine stack frames are in general bigger than stack frames on a 32-bit machine. So, if your dev box is 32-bit you may not see what you see in production. I wrote a little bit about this here http://blogs.msdn.com/b/xmlteam/archive/2011/09/26/effective-xml-part-5-something-went-really-wrong-outofmemoryexception-and-stackoverflowexception-thrown-when-using-xslcompiledtransform.aspx. It is a bit different context but the discussion about IIS, stack sizes and frame sizes still applies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a desktop .NET WPF application witch uses an embedded database (SQLite). Where
I have a WPF .NET 3.5 SP1 application that is in use on at
I have a .Net 4.0 WPF application that requires an embedded database. MS Access
We have created a beautifully designed .NET WPF desktop application. We are installing the
I have a WPF application (.NET 3.0, VS2008) that displays data in a tab
I have a WPF VB.NET project in Visual Studio 2008. For some reason, Visual
We have a .NET application which our customers consider too large for mass deployment
I have a desktop client application build under .net 4.0 and WPF. In this
Greetings, We have an application written in .net 3.5 that uses wcf and also
We have a .net WPF application running as both XBAP and Desktop etc.I haven't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.