0

I am doing a .NET Core 2.0 App. I am calling a webService. I added a Reference to a local Service and call it from my Application.

 ServiceReference1.QueryCalendarClient  servicio = null;
                ServiceReference1.ListCalendarDayTypeRequest request = new ServiceReference1.ListCalendarDayTypeRequest();
                ServiceReference1.ListCalendarDayTypeResponse response = null;

                var binding = new BasicHttpBinding();
                binding.ReceiveTimeout = new TimeSpan(0, 25, 0);
                binding.SendTimeout = new TimeSpan(0, 25, 0);
                binding.MaxBufferSize = 2147483647;
                binding.MaxReceivedMessageSize = 2147483647;
                binding.Security = new BasicHttpSecurity
                {
                    Mode = BasicHttpSecurityMode.TransportCredentialOnly,
                    Transport = new HttpTransportSecurity()
                    {
                        ClientCredentialType = HttpClientCredentialType.Basic
                    }
                };
                servicio = new ServiceReference1.QueryCalendarClient(binding, new EndpointAddress("http://WebBasica?wsdl"));
               
                servicio.ClientCredentials.UserName.Password = "123456789";
                servicio.ClientCredentials.UserName.UserName = "user";

 response = new ServiceReference1.ListCalendarDayTypeResponse();
            response = servicio.Method(request.CalendarInquireRequest_MT).Result;

I have an time Out Exception.

The request channel timed out while waiting for a reply after 00:24:58.3211575. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

Any timeOut I set, gave me a TimeOut error...

Where can I set the time out?

What I am missing?

Thank

Diego
  • 2,238
  • 4
  • 31
  • 68
  • is there some problem in your service endpoint(http://WebBasica?wsdl)? which binding your service use? l would like to check your server side configuration. – Abraham Qian Dec 12 '18 at 09:40
  • Thanks Abraham, I do not have access to the service...it is not made by me. I have to ask. I think you are right, that is a problem on the service. When I run it from SOAPUI sometimes it works and sometimes it does not. – Diego Dec 13 '18 at 11:26

0 Answers0