У меня есть оконная служба, которая использует службу wcf с использованием basichttpbinding, и мы постоянно получаем эту ошибку при развертывании в нашей промежуточной среде. Вот трассировка стека
There was no endpoint listening at http://stgenv.com/Notification/NotificationService.svc that could
accept the message. This is often caused by an incorrect address or SOAP
action. See InnerException, if present, for more details.
Stack Trace:
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Notifications.Transport.INotificationService.GetNotificationsList()
at Vuepoint.Services.Notifications.SendService.Job.Process(Object state)
Странная часть - это то, что она не воспроизводится на нашей локальной машине, а также, кажется, что она исправляет себя, когда мы перезапускаем потребителя службы Windows .
Мы также замечаем это в журнале
The HTTP service located at http://stgenv.com/Notification/NotificationService.svc is unavailable. This could be because the service is too busy or because no endpoint was found listening at the specified address. Please ensure that the address is correct and try accessing the service again later.
Stack Trace:
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Notifications.Transport.INotificationService.GetNotificationsList()
at Notifications.SendService.Job.Process(Object state)
Вот подробности привязки, мы уже установили максимальный размер буфера
private static BasicHttpBinding GetBinding()
{
var result = new BasicHttpBinding();
result.MaxBufferSize = 2147483647;
result.MaxReceivedMessageSize = 2147483647;
result.ReceiveTimeout = TimeSpan.FromMinutes(10);
result.SendTimeout = TimeSpan.FromMinutes(10);
System.Xml.XmlDictionaryReaderQuotas quotas = new System.Xml.XmlDictionaryReaderQuotas();
quotas.MaxStringContentLength = 2147483647;
result.ReaderQuotas = quotas;
return result;
}