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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:50:22+00:00 2026-05-28T22:50:22+00:00

I am making a webservice (can’t shift to wcf due to .net req). My

  • 0

I am making a webservice (can’t shift to wcf due to .net req). My WebServiceRequest Class has list of other classes in it. I get below error when I try to compile code:

request.List = list;

Cannot implicitly convert type
‘System.Collections.Generic.List’ to
‘ServiceReference1.foo[]’

This error goes away when i do request.List = list.ToArray();
but when i run the code i get this exception:

An error occurred while receiving the HTTP response to
http://localhost:60380/fooService/fooService.asmx. This could be due
to the service endpoint binding not using the HTTP protocol. This
could also be due to an HTTP request context being aborted by the
server (possibly due to the service shutting down). See server logs
for more details.

Inner Exception:

The underlying connection was closed: An unexpected error occurred on
a receive.

Server stack trace:

at
System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException
webException, HttpWebRequest request, HttpAbortReason abortReason)
at
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan
timeout) at
System.ServiceModel.Channels.RequestChannel.Request(Message message,
TimeSpan timeout) at
System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message
message, TimeSpan timeout) at
System.ServiceModel.Channels.ServiceChannel.Call(String action,
Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
Object[] outs, TimeSpan timeout) at
System.ServiceModel.Channels.ServiceChannel.Call(String action,
Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
Object[] outs) at
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
methodCall, ProxyOperationRuntime operation) at
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage
message)

Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) at
ServiceReference1.testpingtestSoap.Calculatetestping(CalculatetestpingRequest1
request) at
ServiceReference1.testpingtestSoapClient.ServiceReference1.testpingtestSoap.Calculatetestping(CalculatetestpingRequest1
request) in c:\Users\User\AppData\Local\Temp\Temporary ASP.NET
Files\test\2e05987f\91110734\App_WebReferences.rwmro5zd.0.cs:line 855
at
ServiceReference1.testpingtestSoapClient.Calculatetestping(CalculatetestpingRequest
_request) in c:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\test\2e05987f\91110734\App_WebReferences.rwmro5zd.0.cs:line 862
at testCost2.Calculatetestping() in
c:\Users\User\Desktop\test\InfoSystem\testping\testCost2.aspx.cs:line
203 at testCost2.Submit_Go(Object sender, EventArgs e) in
c:\Users\User\Desktop\test\InfoSystem\testping\testCost2.aspx.cs:line
148 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) at
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Edit 1:
Request & Responce Classes of Web Service

 public class Item
    {

        public List<string> Composites { get; set; }
        public string Composites_List { get { return string.Join(", ", Composites.ToArray()); } }



        public List<px> pxes { get; set; }
        public List<ox> oxes { get; set; }

        public List<MethodCalculationType> MethodCalculationTypes { get; set; }
        public ShippingItem() { }
        public void ShippingItemFill(string sku, int quantity)
        {
            \\this method is just written to avoid parameterless constructor error
        }
        public static ItemComparison = delegateItem item1, Item item2) { return item1.Area.CompareTo(item2.Area); };
    }
   public class Request
    {
        public List<Item> ItemList;
        public bool showAllRatesField;
        public bool m_Ignore;
        public string pTextField;
        public decimal TotalField;

            }
    public class Responce
    {
        public od [] ods;

    }
  • 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-05-28T22:50:23+00:00Added an answer on May 28, 2026 at 10:50 pm

    Found the problem, you can use as many Lists<> in your parameters to webservice as you want, here’s what i found; in case someone needs it:

    1. Enabled dignostics on server by adding below to web.config on server side

    <system.diagnostics>
    <trace autoflush="true" />
    <sources>
    <source name="System.Web.Services.Asmx">
    <listeners>
    <add name="AsmxTraceFile" type="System.Diagnostics.TextWriterTraceListener"
    initializeData="local.log" traceOutputOptions="LogicalOperationStack,
    DateTime, Timestamp, ProcessId, ThreadId" />
    </listeners>
    </source>
    </sources>
    <switches>
    <add name="System.Web.Services.Asmx" value="Verbose" />
    </switches> </system.diagnostics>

    2. When Http Exception occured; in log file it wrote error reading or writing a variable i looked up that variable in webservice code and that variable was internal, removed internal keyword from that variable and the code started working.

    Turns out soap needs paramerters to be serialized so any varaible in your custom parameter class should be public read/write. as mentioned by John Saunders here

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

Sidebar

Related Questions

When making calls to a webservice from an asp.net web application, to avoid creating
I'm making a webservice that acts as user authentication module. You can add roles,
hi to all i am using Nusoap class for making the webservice. i am
If I upgrade a WCF Web Service from .NET 3.5 to 4.0, making no
I am making a POST to a webservice that is local to the webserver.
i am making a webservice, mostly is done but the thing is [WebMethod] returns
I have a Flex client making RESTful calls to a webservice using HTTPService. The
If another website is making a POST to my ASP.NET MVC 2 site, how
I have a @WebService class that injects an @EJB. The EJB is packaged in
I'm thinking of making a web service that can file bugs on issue trackers

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.