Я написал небольшое приложение .NET, которое подключается к удаленному хосту через http для извлечения данных из него.Он отлично работает на моей локальной машине, но когда я опубликовал его на своем производственном сервере, приложение не смогло установить успешное соединение с удаленным хостом.Я не знаю, что мне здесь не хватает - любая помощь будет оценена.
Это часть журнала трассировки .net с сервера:
System.Net Verbose: 0 : [4972] Entering WebRequest::Create(https://tls1ca.imodulesapi.com/ws/21/GeneralQuery.asmx)
System.Net Verbose: 0 : [4972] Entering HttpWebRequest#39857290::HttpWebRequest(https://tls1ca.imodulesapi.com/ws/21/GeneralQuery.asmx#-1022471907)
System.Net Information: 0 : [4972] RAS supported: True
System.Net Verbose: 0 : [4972] Exiting HttpWebRequest#39857290::HttpWebRequest()
System.Net Verbose: 0 : [4972] Exiting WebRequest::Create() -> HttpWebRequest#39857290
System.Net Verbose: 0 : [4972] Entering HttpWebRequest#39857290::GetRequestStream()
System.Net Verbose: 0 : [4972] Entering ServicePoint#56908170::ServicePoint(tls1ca.imodulesapi.com:443)
System.Net Information: 0 : [4972] Associating HttpWebRequest#39857290 with ServicePoint#56908170
System.Net Information: 0 : [4972] Associating Connection#13418106 with HttpWebRequest#39857290
System.Net Verbose: 0 : [4856] Entering WebRequest::Create(https://tls1ca.imodulesapi.com/ws/21/GeneralQuery.asmx)
System.Net Verbose: 0 : [4856] Entering HttpWebRequest#60207123::HttpWebRequest(https://tls1ca.imodulesapi.com/ws/21/GeneralQuery.asmx#-1022471907)
System.Net Verbose: 0 : [4856] Exiting HttpWebRequest#60207123::HttpWebRequest()
System.Net Verbose: 0 : [4856] Exiting WebRequest::Create() -> HttpWebRequest#60207123
System.Net Verbose: 0 : [4856] Entering HttpWebRequest#60207123::GetRequestStream()
System.Net Information: 0 : [4856] Associating HttpWebRequest#60207123 with ServicePoint#56908170
System.Net Information: 0 : [4856] Associating Connection#56833753 with HttpWebRequest#60207123
System.Net Verbose: 0 : [4860] Entering WebRequest::Create(https://tls1ca.imodulesapi.com/ws/21/GeneralQuery.asmx)
System.Net Verbose: 0 : [4860] Entering HttpWebRequest#28387590::HttpWebRequest(https://tls1ca.imodulesapi.com/ws/21/GeneralQuery.asmx#-1022471907)
System.Net Verbose: 0 : [4860] Exiting HttpWebRequest#28387590::HttpWebRequest()
System.Net Verbose: 0 : [4860] Exiting WebRequest::Create() -> HttpWebRequest#28387590
System.Net Verbose: 0 : [4860] Entering HttpWebRequest#28387590::GetRequestStream()
System.Net Information: 0 : [4860] Associating HttpWebRequest#28387590 with ServicePoint#56908170
System.Net Information: 0 : [4860] Associating Connection#17693431 with HttpWebRequest#28387590
System.Net Error: 0 : [4972] Exception in HttpWebRequest#39857290:: - Unable to connect to the remote server.
Вот исключение из браузера:
<!--
[SocketException]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 104.18.230.150:443
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
[WebException]: Unable to connect to the remote server
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at IMWSInterface.Models.APIAccess.AddEnvelopToRequest(XmlDocument soapEnvelop, HttpWebRequest request)
at IMWSInterface.Models.APIAccess.GetMemberId(String constitID)
at IMWSInterface.Controllers.HomeController.Index()
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->