TimeoutException randomly when call WCF method from PCL

Nicola Bracchini 1 Reputation point
2021-02-17T15:21:16.857+00:00

Hi all,

I've a strange problem in my app. When i call a webmethod from my ws (IIS 10 but always in IIS 7) randomly i receive TimeoutException. The same WS is used in an old VS 2010 application that work correctly without errors. The ws work well also if i call from browser. This is the stack trace:

at System.ServiceModel.Channels.HttpRequestChannel+HttpChannelRequestAsyncResult.WaitEnd () [0x0001b] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs:504
at System.ServiceModel.Channels.HttpRequestChannel.EndRequest (System.IAsyncResult result) [0x00022] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs:351
at System.ServiceModel.Channels.HttpRequestChannel.Request (System.ServiceModel.Channels.Message message, System.TimeSpan timeout) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs:73
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Channels.Message msg, System.TimeSpan timeout) [0x00008] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:585
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Description.OperationDescription od, System.Boolean isAsync, System.Object[]& parameters, System.ServiceModel.OperationContext context) [0x00069] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:537
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (System.Reflection.MethodBase method, System.String operationName, System.Boolean isAsync, System.Object[]& parameters, System.ServiceModel.OperationContext context) [0x00031] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:502
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (System.Reflection.MethodBase method, System.String operationName, System.Boolean isAsync, System.Object[]& parameters, System.ServiceModel.OperationContext context) [0x0001e] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:485
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters, System.ServiceModel.OperationContext context) [0x00002] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:470
at System.ServiceModel.ClientRealProxy.DoInvoke (System.Runtime.Remoting.Messaging.IMessage inputMessage) [0x000b8] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs:111
at System.ServiceModel.ClientRealProxy.Invoke (System.Runtime.Remoting.Messaging.IMessage inputMessage) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs:86
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke (System.Runtime.Remoting.Proxies.RealProxy rp, System.Runtime.Remoting.Messaging.IMessage msg, System.Exception& exc, System.Object[]& out_args) [0x000d6] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs:279

Any ideas?

Thanks
Nicola

Developer technologies .NET Xamarin
Developer technologies .NET Other
{count} votes

1 answer

Sort by: Most helpful
  1. Nicola Bracchini 1 Reputation point
    2021-02-24T11:03:10.807+00:00

    UPDATE.

    After various tests (Dowgraded Android target version, upgraded Android target version, changed wcf from SOAP to RESTful) nothing seems to change.
    The strangest thing is that in an Android 8.1, based device, the problem is not present.

    So i think that is a bug in VS2019!

    Someone have experience in same problem?

    Thanks!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.