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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:19:23+00:00 2026-05-26T22:19:23+00:00

We call a webservice from our C# app which takes about 300ms using WCF

  • 0

We call a webservice from our C# app which takes about 300ms using WCF (BasicHttpBinding). We noticed that the same SOAP call does only take about 30ms when sending it from SOAP UI.

Now we also implemented a test accessing the webservice via a basic WebClient in order to make sure that the DeSer-part of the WCf is not the reason for this additional delay. When using the WebClient class the call takes about 300ms as well.

Any ideas on why Java compared to C# is about 10x faster in this regard? Is there some kind of tweaking possible on the .NET side of things?

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        executeTest(() =>
            {
                var resultObj = client.getNextSeqNr(new WcfClient()
                {
                    domain = "?",
                    hostname = "?",
                    ipaddress = "?",
                    loginVersion = "?",
                    processId = "?",
                    program = "?",
                    userId = "?",
                    userIdPw = "?",
                    userName = "?"
                }, "?", "?");
            });
    }

    private void Button_Click_1(object sender, RoutedEventArgs e)
    {
        WebClient webClient = new WebClient();

        executeTest(()=>
            {
                webClient.Proxy = null;
                webClient.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore);
                webClient.Headers.Add("Content-Type", "application/xml");
                webClient.Encoding = Encoding.UTF8;
                var data = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ser=\"SomeNamespace\">" +
                            "   <soapenv:Header/>" +
                            "   <soapenv:Body>" +
                            "      <ser:getNextSeqNr>" +
                            "         <!--Optional:-->" +
                            "         <clientInfo>" +
                            "            <!--Optional:-->" +
                            "            <domain>?</domain>" +
                            "            <!--Optional:-->" +
                            "            <hostname>?</hostname>" +
                            "            <!--Optional:-->" +
                            "            <ipaddress>?</ipaddress>" +
                            "            <!--Optional:-->" +
                            "            <loginVersion>?</loginVersion>" +
                            "            <!--Optional:-->" +
                            "            <processId>?</processId>" +
                            "            <!--Optional:-->" +
                            "            <program>?</program>" +
                            "            <!--Optional:-->" +
                            "            <userId>*</userId>" +
                            "            <!--Optional:-->" +
                            "            <userIdPw>?</userIdPw>" +
                            "            <!--Optional:-->" +
                            "            <userName>?</userName>" +
                            "         </clientInfo>" +
                            "         <!--Optional:-->" +
                            "         <name>?</name>" +
                            "         <!--Optional:-->" +
                            "         <schema>?</schema>" +
                            "      </ser:getNextSeqNr>" +
                            "   </soapenv:Body>" +
                            "</soapenv:Envelope>";
                string result = webClient.UploadString("http://server:8080/service", "POST", data);
            });
    }

Am I missing something here? Any idea would be helpful… 😉

Kind regards,
Sebastian

  • 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-26T22:19:24+00:00Added an answer on May 26, 2026 at 10:19 pm

    I just found the reason for this.

    It’s the 100-Expect Continue HTTP Header and the corresponding implementation in .NET. The .NET client wait 350ms as default on the server. This causes the delays. Java seems to have other default values here…

    Just add the following line of code very early in your code:

    System.Net.ServicePointManager.Expect100Continue = false;
    

    Cheers!

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

Sidebar

Related Questions

I want to call a webservice from jQuery. How can I do that?
I'd like to call a .net webservice from another domain using only jquery. What
I'm trying to call an asp.net webservice from the same project it's in: [MethodImpl(MethodImplOptions.Synchronized)]
I'm trying to call a WCF Webservice, from a dll I have made, running
I've got an app that displays information from our web service. The user has
I'm trying to call a webservice from our office sharepoint. It works when I
Can I call a remote webservice from a Stored Procedure and use the values
I am looking to return a PDF from a webservice call. (ATM, a custom
Is it possible to call a web service from within Flash (using AS3)? Or
I'm using Web Services Enhancements 3.0 to call a web-service from an ASP.NET application

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.