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

  • SEARCH
  • Home
  • 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 9203667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:31:24+00:00 2026-06-17T23:31:24+00:00

Problem: The underlying connection was closed: The connection was closed unexpectedly. This happens on

  • 0

Problem:

The underlying connection was closed: The connection was closed unexpectedly.
This happens on my WCF service that is hosted on the visual studio 2010 built in development server.

Information:

this does not happen all the time I believe it is a “big Data” issue, I have googled as hard as I can but non of the solutions I have implemented have fixed anything (and I have tried most of them out there) I most likely am just missing something stupid.

Question:

Why is this happening and how can I fix it?

Client app.Config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="Program.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
              <binding name="BasicHttpBinding_IService1" maxReceivedMessageSize="20000000"
                 maxBufferSize="20000000"
                 maxBufferPoolSize="20000000">
                <readerQuotas maxDepth="32"
                 maxArrayLength="200000000"
                 maxStringContentLength="200000000"/>
              </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:62753/Service1.svc" binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_IService1" contract="ProgramService.IService1"
                name="BasicHttpBinding_IService1" />
        </client>
      <behaviors>
        <endpointBehaviors>
          <behavior name="EndpointBehavior">
            <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          </behavior>
        </endpointBehaviors>
      </behaviors>
    </system.serviceModel>
    <applicationSettings>
        <Program.Properties.Settings>
            <setting name="Program_PROGRAM_Screen" serializeAs="String">
                <value>http://localhost/IntegrationTest/SOAP/PROGRAM.asmx</value>
            </setting>
        </Program.Properties.Settings>
    </applicationSettings>
</configuration>

Service web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
    <httpRuntime executionTimeout="1200" />
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true" />
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
  </system.webServer>
  <connectionStrings>
    <add name="ProgramEntities" connectionString="metadata=res://*/Program.csdl|res://*/Program.ssdl|res://*/Program.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=ACUMATICA1-HPI7;initial catalog=Program;persist security info=True;user id=sa;password=$0l0m0n;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
</configuration>

WCF Activity Log Erro Message:

There was an error while trying to serialize parameter
http://tempuri.org/:ScenarioSummaryResult. The InnerException message
was ‘Type
‘System.Data.Entity.DynamicProxies.ScenarioSummary_A170028D0330F7804BAB85D00BA1EB45FA1754C8A6F6E98C0F003F15078E23A9’
with data contract name
‘ScenarioSummary_A170028D0330F7804BAB85D00BA1EB45FA1754C8A6F6E98C0F003F15078E23A9:http://schemas.datacontract.org/2004/07/System.Data.Entity.DynamicProxies‘
is not expected. Consider using a DataContractResolver or add any
types not known statically to the list of known types – for example,
by using the KnownTypeAttribute attribute or by adding them to the
list of known types passed to DataContractSerializer.’. Please see
InnerException for more details.

Service Information:

I am trying to return a list of Entity Framework stuff

//IService1.cs
[OperationContract]
List<ProgramService.ScenarioSummary> ScenarioSummary(string Module);

//Service1.svc
public List<ProgramService.ScenarioSummary> ScenarioSummary(string module)
        {
            return (from p in Entity.ScenarioSummaries where p.ModuleId.Equals(Entity.Modules.FirstOrDefault(q => q.ModuleName.Equals(module)).Id) select p).ToList();
        }

additional Information:

Any help/explanation of my clear incompetence in this matter and how to correct it would be much appreciated.

  • 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-17T23:31:26+00:00Added an answer on June 17, 2026 at 11:31 pm

    Some one commented that my error looked alot like What are the downsides to turning off ProxyCreationEnabled for CTP5 of EF code first

    and that actually turned out to be my solution. They have since deleted their posting. Thank you mysterious stranger with greater googling skills than I.

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

Sidebar

Related Questions

I am using a NamedParameterJdbcTemplate, but found that this problem is in the underlying
I have a problem making the link between the underlying socket (in this case,
I have this problem, that usually api entry point works fine: https://www.google.com/analytics/feeds/accounts/default but when
I have a WCF service. I can return a concrete class without a problem,
I am having problems installing packages in Visual Studio 2010. When I run the
I'm just about done with a WCF Service that allows me to remote database
I have a WCF service with net.tcp binding, hosted on the server as a
I have an application with multiple DbContext subclasses that share a connection string (this
I've got a C# WCF service that passes a collection of instantiated .Net objects
I've got a WCF service that I've written in C# which passes to the

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.