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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:49:36+00:00 2026-06-05T02:49:36+00:00

I created a WCF service to communicate with database, first I created a sample

  • 0

I created a WCF service to communicate with database, first I created a sample Helloworld! method it’s working fine

but when I try to call the actual methods it’s giving following exception

An error occurred while receiving the HTTP response to http://10.11.32.211:87/Service.svc. This could be due to the service endpoint binding not using the HTTP protocol.

In the browser

An existing connection was forcibly closed by the remote host

My web.config file

<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>

<!--<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>-->

<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
<services>
  <service behaviorConfiguration="ServiceBehavior" name="Service">
    <endpoint address="" binding="basicHttpBinding" contract="IService">
      <identity>
        <dns value="localhost"/>
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
  </service>
  </services>
  <behaviors>
   <serviceBehaviors>
     <behavior name="ServiceBehavior">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
      <dataContractSerializer maxItemsInObjectGraph="2147483646"/>
       <serviceThrottling maxConcurrentCalls="3000" maxConcurrentSessions="3000" maxConcurrentInstances="3000"/>
     </behavior>
    </serviceBehaviors>
  </behaviors>
 </system.serviceModel>
 </configuration>

I go through these links but it didn’t worked
MSDN LINK1

Edit

Actually what I am doing with this service is to execute a stored procedure on the server

using (con = new SqlConnection(connectionString))
        {
            using (cmd = new SqlCommand(selectStatement, con) { CommandType = CommandType.StoredProcedure })
            {
                adapter = new SqlDataAdapter(cmd);
                table = new DataTable();
                adapter.Fill(table);
                return table;
            }
        }

I am able to call the same stored procedure from different website manually but not using this service….

What is it? and why this is coming?

  • 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-05T02:49:37+00:00Added an answer on June 5, 2026 at 2:49 am

    i found the answer for this here, we just need to instantiate the datatable with a specified name in its constructor

    like

    DataTable dt = new DataTable("TableName");
    

    I don’t know why this gives error but this solved the issue……..

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

Sidebar

Related Questions

I created a WCF service that has a method which makes a call to
I recently created a WCF service that works fine when tested from Visual Studio
Hi I created WCF service and run it on WebDevelopmentServer. It works fine. Than
I created a WCF service that exposed a method that has one paramater: public
I created a WCF service and Hosted it through console. but when I created
i created a WCf service with a method that can receive GET requests using
I created WCF service and faced with a problem. I need to update database
Created .NET WCF service, tested it - works. Generated schemas from Data and service
I created a WCF service that uses TagLib# ( http://developer.novell.com/wiki/index.php/TagLib_Sharp ) which relies on
I created a WCF service (.NET 3.5) that grabs data from a db and

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.