Я размещаю службу Workflow в стандарте Windows Server 2008 R2. Я обращаюсь к нему через консольное приложение с поддержкой Windows/topshelf, запущенным на том же сервере. Проблема в том, что я не могу получить доступ к конечной точке локально (с одного и того же сервера), но могу получить доступ к ней с любого другого сервера (используя одни и те же учетные записи службы, тот же домен).Доступ только к конечной точке службы рабочего процесса WCF удаленно
Мой клиент (окна обслуживания) привязок выглядеть следующим образом:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BindingIBeginNewRequestAdded">
<security mode="Transport">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://WorkFlowServerTest.corp.gdg/NewAccountRequestWorkflow.xamlx" binding="basicHttpBinding"
bindingConfiguration="BindingIBeginNewRequestAdded" contract="NewAccountRequest.IBeginNewRequestAdded" name="BindingIBeginNewRequestAdded"/>
</client>
</system.serviceModel>
WorkFlow привязок Service выглядеть следующим образом:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="HTTPSBindingConfiguration">
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
<binding name="MEXHTTPSBindingConfiguration">
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="HTTPSBehavior" name="NewAccountRequestWorkflow">
<endpoint address="mex" binding="basicHttpBinding" bindingConfiguration="MEXHTTPSBindingConfiguration" contract="IMetadataExchange" />
<endpoint binding="basicHttpBinding" bindingConfiguration="HTTPSBindingConfiguration" name="SecureTransportNoCredentialsEndpoint6" contract="IBeginNewRequestAdded" />
</service>
</services>
C#/Windows Service Code:
NewAccountRequest.BeginNewRequestAddedClient _ws = new NewAccountRequest.BeginNewRequestAddedClient();
_ws.BeginNewRequestAdded(_newRequest.RequestID);
Ошибка :
System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest request, HttpWebResponse response, WebException responseException, HttpChannelFactory`1 factory)
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory`1 factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.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 WinSvc.DailySales.NewAccountRequest.IBeginNewRequestAdded.BeginNewRequestAdded(BeginNewRequestAddedRequest request)
at WinSvc.DailySales.NewAccountRequest.BeginNewRequestAddedClient.WinSvc.DailySales.NewAccountRequest.IBeginNewRequestAdded.BeginNewRequestAdded(BeginNewRequestAddedRequest request)
at WinSvc.DailySales.Classes.DailySalesExceptionHandler.CallGPAccountSubmitService()
Так что я знал об этом: https://support.microsoft.com/en-us/kb/896861
И уже добавили BackConnectionHostNames из: WorkFlowServerTest.corp.gdg в HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ LSA \ MSV1_0.
Я пробовал каждую комбинацию параметров клиента и сервера clientCredentialType и режима безопасности в привязках. Проиграл ...