powered by simpleCommunicator - 2.0.49     © 2025 Programmizd 02
Форумы / WCF, Web Services, Remoting [игнор отключен] [закрыт для гостей] / превышен интервал времени ожидания запроса
2 сообщений из 2, страница 1 из 1
превышен интервал времени ожидания запроса
    #37186982
qwantor
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Доброго времени суток!

У меня происходит такая история:
Есть WCF сервис, он хостится в вин служб. Сервис работает с классом, у которого есть private static типа очередь, есть объект private static readonly object, по которому происходит синхронизация и есть некоторые public методы, через которые заполняется эта типа очередь. В обработчике таймера пишется в файлик всякая отладочная информация, как заблокирован ли объект синхронизации, сколько элементов в очереди и т.д. У сервиса аутентификация Windows.

Клиент у этого сервиса один- ASP.Net страница. В течении дня, после нескольких часов нормальной работы, при попытке открыть подключение возникает ошибка "превышен интервал ожидания запроса". При этом описание сервиса открывается, и в трасировочный файлик спокойно себе пишется всё, что нужно. В частности пишется, что объект синхронизации не заблокирован. Т.е. не просто пишется :), а он правда не заблокирован, т.к. Monitor.TryEnter возвращает true, ну и конечно после удачной блокировки я делаю Monitor.Exit.
После перезагрузки вин службы снова работает несколько часов и перестаёт отвечать на запросы.

Подскажите, пожалуйста, в чём может быть дело!
...
Рейтинг: 0 / 0
превышен интервал времени ожидания запроса
    #37187489
qwantor
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
qwantor,

WCF Test Client подключался минут пять, что с моего компа, что прям с сервера, при попытки вызвать метод вываливается такое исключение:

Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.

и стэк:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
Не удалось подключиться к http://localhost:8731/WCFSerivce/. 
Код ошибки TCP 10061: Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение 127.0.0.1:8731. 

Server stack trace: 
   в System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
   в System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
   в System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider, TimeSpan timeout)
   в System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
   в System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)
   в System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)
   в System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
   в System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   в System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   в System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   в ILazyEmailSenderWCFSerivce.Add(Guid massemailresultid)
   в LazyEmailSenderWCFSerivceClient.Add(Guid massemailresultid)

И тут, что удивительно в стеке указан localhost, а не адрес сервера. А если подправить адрес сервера, то возникает другая ошибка:
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
Подлинность вызывающего пользователя не была проверена службой.

Server stack trace: 
   в System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
   в System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
   в System.ServiceModel.Security.SecurityUtils.OpenTokenProviderIfRequired(SecurityTokenProvider tokenProvider, TimeSpan timeout)
   в System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
   в System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)
   в System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)
   в System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   в System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
   в System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   в System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   в System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   в System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   в ILazyEmailSenderWCFSerivce.Add(Guid massemailresultid)
   в LazyEmailSenderWCFSerivceClient.Add(Guid massemailresultid)

Т.о. стало всё ещё более не понятно. Зачем при подключении к WCF Test Client не написал тот адрес, который я указывал в при подключении, а написал localhost??
Что касается ошибки после исправления адреса, то тоже не ясно если сервис работает, то с чего это вдруг клиент спустя пару часов работы стал поддельным??
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / WCF, Web Services, Remoting [игнор отключен] [закрыт для гостей] / превышен интервал времени ожидания запроса
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]