0
votes

In a windows form application, if i call web service as a service reference i easily adjust client side time out in app.config bindings like this:

when i call svc it automatically gives me bindings, i only add timeouts:

 <binding openTimeout = "00:00:05"
         closeTimeout = "00:00:05"
         sendTimeout = "00:00:05"
         receiveTimeout = "00:00:05"  name="CustomBinding_srvEx">

But if i call web service as a web reference i cant adjust client side timeout. Where should i write the timeout settings in app.config. No binding it gives in app.config.

when i call asmx it gives me those codes in app.config:

<applicationSettings>
        <timeout.Properties.Settings>
            <setting  name="timeout_deneme" serializeAs="String">
                <value>https:....asmx</value>
            </setting>
        </timeout.Properties.Settings>
    </applicationSettings>
1

1 Answers

0
votes

You can set the timeout via code and read the value from your app.config

var client = new MyService();
client.InnerChannel.OperationTimeout = new TimeSpan(0, 5, 0); // read value from app.config