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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:17:00+00:00 2026-06-09T22:17:00+00:00

As the questions states. I am unable to send List<T> over WCF. I cannot

  • 0

As the questions states. I am unable to send List<T> over WCF. I cannot understand why and I have been searching high and low over the internet for the past week without any concrete answers. I keep getting a SocketException: An existing connection was forcibly closed by the remote host. However, if I call a method that only returns a string, it works without problems.

I am hosting my WCF on IIS Express 7.5. I can confirm that I can access my service via my browser or other devices on my local network via my machine’s IP.

If it’s of any help, I am actually following this tutorial:
http://www.c-sharpcorner.com/uploadfile/urmimalapal/creating-a-windows-phone-7-application-consuming-data-using-a-wcf-service/

When I attempt to call FindEmployee, I get that error. I have also created another method that simply returns a string and calling it works fine. No errors. I have tried it on my WP7 emulator, WCF Test Client and WCFStorm and they all exhibit the same problem with List<T> trying to be returned and string being returned with no problems. I have also confirmed the list is being populated properly when my Linq statement hits the breakpoint. It’s definitely WCF refusing to send my List<T>.

Edit:
This is the XML reply I’m getting from WCFStorm when I attempt to call a method that throws a List<T>.

<FindVendor>
  <MethodParameters>
    <SocketException>
      <ErrorCode>10054</ErrorCode>
      <Message>An existing connection was forcibly closed by the remote host</Message>
      <SocketErrorCode>ConnectionReset</SocketErrorCode>
      <NativeErrorCode>10054</NativeErrorCode>
      <Data>
        <KeysAndValues attr0="KeyValuePairArray" isNull="false" />
      </Data>
      <InnerException isNull="true" />
      <TargetSite>Int32 Read(Byte[], Int32, Int32)</TargetSite>
      <StackTrace>at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)</StackTrace>
      <HelpLink isNull="true" />
      <Source>System</Source>
    </SocketException>
  </MethodParameters>
</FindVendor>
  • 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-09T22:17:02+00:00Added an answer on June 9, 2026 at 10:17 pm

    I haven’t bothered to download any sample code associated with the tutorial, but I notice the MyEmployee entity is not defined in the tutorial. You should ensure that it is marked with the [Serializable] attribute like so:

    [Serializable]
    public class MyEmployee
    {
        public int Property1 { get; set; } // etc
    } 
    

    There is also the possiblity that you will have to declare KnownTypes to the serialiser, depending on what you are doing – you should post the piece of code, and maybe turn on WCF logging to get you a better error message.

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

Sidebar

Related Questions

This is pretty easy question, but I have been unable to find the solution
I know similar questions have been asked but none have been helpful to me.
as the question states. I have implemented a function wherein it fetches multiple rows
As the question states, I have two ethernet devices I need to use. A
I have two questions related to function objects and function pointers, Question : 1
I am using the new Spring Security 3.1 and have a few questions to
I have a GPS navigation application for Android 2.3.3 which I have been working
I have 4 tables namely, countries, states, cities, areas, apart from countries table the
I currently have an application that gets hit with over 20,000 users daily and
I have posted this before but was unable to explain with clarity so reposting.

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.