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

The Archive Base Latest Questions

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

I have a web site that communicates with a .NET 4 WCF web services.

  • 0

I have a web site that communicates with a .NET 4 WCF web services. That WCF service connects to Dynamics GP Web Services on a remote server. Both Web Services are self-hosted (no IIS).

The first call to GP takes around 12 seconds to complete!! Calls immediately after (even in another WCF request) are around 100ms, but if I wait a minute or two between calls, it will take again 10 seconds…

What could be the cause of the issue, how can I resolve it?

I’ve generated a proxy using both SvcUtil and VS 2010 Add Service Reference, but got the same problem with both. The Dynamics GP proxy file is huge 3MB, don’t know if that’s related.

I ran Wireshark to analyse network traffic and the actual tcp request-reply stream seems to take less than a second. There seems to be something going on before the request is sent that take up that 10 seconds.

Here is the code used:

Context context = new Context();
CompanyKey companyKey = new CompanyKey();
companyKey.Id = -1;
context.OrganizationKey = companyKey;

System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
sw.Start();

_proxy = new DynamicsGPClient();
_proxy.ClientCredentials.Windows.ClientCredential.Domain = Domain;
_proxy.ClientCredentials.Windows.ClientCredential.UserName = Username;
_proxy.ClientCredentials.Windows.ClientCredential.Password = Password;

long openingMs = sw.ElapsedMilliseconds;
CustomerCriteria customerCriteria = new CustomerCriteria();
CustomerSummary[] gpCustomers = _proxy.GetCustomerList(customerCriteria, context);
long fctCallMs = sw.ElapsedMilliseconds;
...
if (_proxy != null && _proxy.State != System.ServiceModel.CommunicationState.Faulted) {
    _proxy.Close();
}

Here’s the app.config:

<system.serviceModel>
   <bindings>
      <wsHttpBinding>
         <binding name="GPWebService" closeTimeout="00:01:00" openTimeout="00:01:00"
                  receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 
                  transactionFlow="false" hostNameComparisonMode="StrongWildcard" 
                  maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" 
                  messageEncoding="Text" textEncoding="utf-8" 
                  useDefaultWebProxy="true" allowCookies="false">
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
                          maxBytesPerRead="4096" maxNameTableCharCount="2147483647"/>
            <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
            <security mode="Message">
               <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
               <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/>
            </security>
         </binding>
      </wsHttpBinding>
   </bindings>
   <client>
      <endpoint address="http://192.168.x.y:48620/Dynamics/GPService/GPService" binding="wsHttpBinding"
                bindingConfiguration="GPWebService"
                contract="DynamicsGpService.DynamicsGP" name="GPWebService">
         <identity>
            <userPrincipalName value="DEV\gpeconnect"/>
         </identity>
      </endpoint>
   </client>
</system.serviceModel>
  • 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:59:00+00:00Added an answer on May 26, 2026 at 10:59 pm

    Self answer

    For the community, here’s what I have found out (but I can’t explain why, so don’t ask! ;))

    In the Client’s app.config, useDefaultWebProxy="true" should be set to false… this made a very simple Hello World Web Service pass from 7 sec to ~100ms on the first call.

    In the Client’s app.config, completely removing the identity > userPrincipalName section caused the first WCF call to pass from > 10 sec to ~1 sec!

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

Sidebar

Related Questions

I have a web site that runs both classic ASP and ASP.NET Webforms. The
I have a web site that is a customer to customer (C2C) service. Example,
I have a web service site that is restful enabled, so other websites/ajax script
I have a asp.net web site that was developed on the .Net Framework v2
I have an app that communicates with a web service VIA SOAP. So far
I have a web site that I administer that uses Apache 2.0 on the
I have a web site that spits out links to third party sites. Now
I have a web site that work with external Credit Card Processing (cybersource) when
I have inherited a web site project that makes use of a number of
We have a updatable web site project that is written in c#, it has

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.