Setting Timeout Value For .NET Web Service

前端 未结 2 1099
难免孤独
难免孤独 2020-12-01 07:53

I have a web service written in C# that is living on a SharePoint site. I have modified the web.config with the following code:


  <         


        
相关标签:
2条回答
  • 2020-12-01 08:20

    After creating your client specifying the binding and endpoint address, you can assign an OperationTimeout,

    client.InnerChannel.OperationTimeout = new TimeSpan(0, 5, 0);
    
    0 讨论(0)
  • 2020-12-01 08:37

    Try setting the timeout value in your web service proxy class:

    WebReference.ProxyClass myProxy = new WebReference.ProxyClass();
    myProxy.Timeout = 100000; //in milliseconds, e.g. 100 seconds
    
    0 讨论(0)
提交回复
热议问题