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 8700045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:05:48+00:00 2026-06-13T02:05:48+00:00

The issue was originally encountered on a WCF Data Service (OData) where a large

  • 0

The issue was originally encountered on a WCF Data Service (OData) where a large amount of data was being returned (~3MB) and the application consuming the data (an MVC website) would sporadically hang on some of the requests and would eventually time out.

The issue could be replicated on smaller data payloads but would take a long time to occur. The issue has been replicated on both Cassini and IIS 7. When running through IIS I could see the hung W3 worker process stuck in the ‘SendResponse’ state until it times out.

To narrow down the cause of the issue I created a console app that would sequentially download content from an ASP.NET site. The issue was replicated on a WCF Data Service (OData), a standard WCF Service, and a Web Forms page that output similar data directly to the HttpResponse object. The example code used is using the standard WCF Service as an example (for ease of setup for those trying to replicate it).

Console App Client:

    static void Main(string[] args)
    {
        Console.ReadKey(); // press any key to start test

        do
        {
            var req = WebRequest.Create(new Uri("http://localhost:26332/WCFTest.svc/GetData"));
            var response = req.GetResponse();

            using (var stream = response.GetResponseStream())
            {
                var content = new StreamReader(stream).ReadToEnd();           
            }           
        } while (true);
    }

WCF Service:

    public class Service1 : IService1
    {
        public TestClass[] GetData()
        {
            return Enumerable
                .Range(0, 15000)
                .Select(i => new TestClass{ ID = "1" })
                .ToArray();
        }
    }

    [DataContract]
    public class TestClass
    {
        [DataMember]
        public string ID { get; set; }
    }

    [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        [WebGet(UriTemplate = "GetData")]
        TestClass[] GetData();
    }

After a number of calls (this differs on each run, but is usually less than 30) to the web service the GetResponseStream call will hang.

Any ideas on what could be going wrong or how to narrow down the cause of the issue would be appreciated!

Service web.config

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <services>
      <service name="WcfService2.Service1" >
        <endpoint
          address=""
          binding="webHttpBinding"
          contract="WcfService2.IService1"
          behaviorConfiguration="webHttp"/>
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="webHttp">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>  
</configuration>

WCF Data Services code:

public class Service1 : DataService<ODataContext>
{
    public static void InitializeService(DataServiceConfiguration configuration)
    {
        configuration.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
    }
}

public class ODataContext
{
    public IQueryable<TestClass> Test
    {
        get
        {
            return Enumerable
                .Range(0, 15000)
                .Select(i => new TestClass {ID = "1"})
                .AsQueryable();
        }
    }
}

public class TestClass
{
    public string ID { get; set; }
}
  • 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-13T02:05:50+00:00Added an answer on June 13, 2026 at 2:05 am

    Turns out this was an issue with ESET anti-virus inspecting incoming HTTP traffic and dropping some packets. Uninstalling ESET resolved the issue.

    For further information on the ESET issue: http://www.wilderssecurity.com/showthread.php?t=332920

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

Sidebar

Related Questions

Currently porting an iPhone application to Android. I've encountered an issue that I haven't
I originally had a race condition when sending data, the issue was that I
I originally thought this was a WordPress issue - but realize after hours of
Note: This question was originally part of Magento SOAP API V2 with C#: Issue
I have an application that originally needed to connect to Sybase (via ODBC), but
This is the weirdest error I have ever encountered. This MVC web project was
I've encountered a strange issue where my MySQL query works for all cases except
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
I am trying to build a website and have encountered a tricky issue with
We faced with issue originally on the BB app. We stuck in browser whenever

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.