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.
и стэк:
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, а не адрес сервера. А если подправить адрес сервера, то возникает другая ошибка:
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??
Что касается ошибки после исправления адреса, то тоже не ясно если сервис работает, то с чего это вдруг клиент спустя пару часов работы стал поддельным??