what is this : The time allotted to this operation may have been a portion of a longer timeout.

Answered what is this : The time allotted to this operation may have been a portion of a longer timeout.

  • Monday, September 17, 2012 6:25 AM
     
     

    I am using Bing geocodeservice and routeservice. I have been using it for some time but the above error show up today.  What I need to do to resolve this problem?

    The HTTP request to 'http://dev.virtualearth.net/webservices/v1/geocodeservice/GeocodeService.svc' has exceeded the allotted timeout of 00:00:59.9990000. The time allotted to this operation may have been a portion of a longer timeout.

    Thanks

All Replies

  • Monday, September 17, 2012 7:41 AM
     
     Answered

    you can specify time stamp hr:min:sec in your code either in routeservice/geocode service.

    like code below.....this is example of routeservice ,u can change in geocodeservice accordingly.

    bool httpsUriScheme = !Application.Current.IsRunningOutOfBrowser && HtmlPage.Document.DocumentUri.Scheme.Equals(Uri.UriSchemeHttps);
                BasicHttpBinding binding = new BasicHttpBinding(httpsUriScheme ? BasicHttpSecurityMode.Transport : BasicHttpSecurityMode.None);
                binding.MaxReceivedMessageSize = int.MaxValue;
                binding.MaxBufferSize = int.MaxValue;

    TimeSpan ts = new TimeSpan(2, 30, 0);
                binding.ReceiveTimeout = ts;
                binding.OpenTimeout = ts;
                binding.SendTimeout = ts;

            Thanks

    prakash

  • Monday, September 17, 2012 7:44 AM
     
     Answered

    it coming because of time allotted by services is 1 minute....so u can maximaize time in ur code,using TimeSpan object.i have mentioned.

    Thanks

    Prakash

  • Monday, September 17, 2012 1:20 PM
     
     

    you can specify time stamp hr:min:sec in your code either in routeservice/geocode service.

    like code below.....this is example of routeservice ,u can change in geocodeservice accordingly.

    bool httpsUriScheme = !Application.Current.IsRunningOutOfBrowser && HtmlPage.Document.DocumentUri.Scheme.Equals(Uri.UriSchemeHttps);
                BasicHttpBinding binding = new BasicHttpBinding(httpsUriScheme ? BasicHttpSecurityMode.Transport : BasicHttpSecurityMode.None);
                binding.MaxReceivedMessageSize = int.MaxValue;
                binding.MaxBufferSize = int.MaxValue;

    TimeSpan ts = new TimeSpan(2, 30, 0);
                binding.ReceiveTimeout = ts;
                binding.OpenTimeout = ts;
                binding.SendTimeout = ts;

            Thanks

    prakash

    Hi,  I am use these  geocode and route services in windows phone. All I have is servicereference.clientconfig. How do I make the change in code?

    Thanks

  • Tuesday, September 18, 2012 7:13 AM
     
     

    Hi,

    in ur code behind ..r u writing nothing to call services(geocode,routeservice)??? i dnt think so.

    as far as my knowledge,in service references we cant change the code.because they used to be executed through configuration file.and u have mentioned  above to correct the service-reference. please correct if i wrong.

                                                              where u will be calling the services in your code,after creating request object,you can specify the time out.

    Thanks

    prakash

  • Thursday, September 20, 2012 2:10 PM
     
     

    Hi prakash,

    So sorry for the late reply. I was checking my app behaviour.

    Now, I begin to understand what you say. Please help to setup settings for

    1) Country with 3 or 4 G network

    2) 2 or 2.5 G network.

    What will be the ideal settings for above (1) and (2) ?

    openTimeout  0:00:00 <-- hrs: mm:ss
     receiveTimeout
    closeTimeout              
    sendTimeout

    should set the same time for receiveTimeout = closetimeout?

    can set SenTiimeout as same closeTimeout?

    Thanks

  • Monday, September 24, 2012 4:27 AM
     
     

    it depends on ur time duration of request.

    e.g.i had needed route for 17000 pair of points in a single short.so i have made time out as 2 hr 30 min.

    and second thing u can set all time out to equal time duration.

    Thanks