Не могу справится с конфигурацией ,есть Windows Service являющийся клиентом WCF service << ImageOperations>>.
WCF service в iis определен как sso- windows credential.
Конфигурация WCF 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.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Ifn.W2.WebServices.SilverlightWCFBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="Ifn.W2.WebServices.ImageOperationsBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<customBinding>
<binding name="Ifn.W2.WebServices.SilverlightWCF.customBinding0">
<binaryMessageEncoding />
<httpTransport />
</binding>
</customBinding>
<basicHttpBinding>
<binding name="winAuthBasicHttpBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"/>
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="wsHttpBindingForImageOperations" sendTimeout="00:02:00"
maxBufferPoolSize="29999888" maxReceivedMessageSize="29999888"
messageEncoding="Mtom">
<readerQuotas maxArrayLength="10999888" />
<!--security mode="Message">
</security-->
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="Ifn.W2.WebServices.SilverlightWCFBehavior" name="Ifn.W2.WebServices.SilverlightWCF">
<!--endpoint address="" binding="customBinding" bindingConfiguration="Ifn.W2.WebServices.SilverlightWCF.customBinding0" contract="Ifn.W2.WebServices.ISilverlightWCF" /-->
<!--endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /-->
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="winAuthBasicHttpBinding" contract="Ifn.W2.WebServices.ISilverlightWCF" />
</service>
<service behaviorConfiguration="Ifn.W2.WebServices.ImageOperationsBehavior" name="Ifn.W2.WebServices.ImageOperations">
<!-- When working in SSO configuration, comment out the first binding (wsHttpBinding) and uncomment basicHttpBinding
Also, make sure activate the SSO section in the client configuration -->
<!-- When working in SSO configuration, comment out the first binding (wsHttpBinding) and uncomment basicHttpBinding
Also, make sure activate the SSO section in the client configuration -->
<!--endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingForImageOperations" contract="Ifn.W2.WebServices.IImageOperations"/-->
<!--endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/-->
<endpoint address="" binding="basicHttpBinding" bindingConfiguration="winAuthBasicHttpBinding" contract="Ifn.W2.WebServices.IImageOperations"/>
<host>
<timeouts closeTimeout="00:02:00"/>
</host>
</service>
</services>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
Конфигурация Windows 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.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IImageOperations" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="7999888"
messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="999999999"
maxArrayLength="2007483648" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
<binding name="WSHttpBinding_IImageOperations1" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="99999999" maxReceivedMessageSize="999999999"
messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="9999999"
maxArrayLength="2007483648" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://fnsvcP4/DriveUWS/ImageOperations.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IImageOperations"
contract="WCFRenderingService2.IImageOperations" name="WSHttpBinding_IImageOperations">
<identity>
<userPrincipalName value="ifnadmin@hq.corp.phoenix.co.il" />
</identity>
</endpoint>
<endpoint address="http://fnsvcP4.hq.corp.phoenix.co.il/DriveUWS/ImageOperations.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IImageOperations1"
contract="WCFRenderingService.IImageOperations" name="WSHttpBinding_IImageOperations1">
<identity>
<userPrincipalName value="ifnadmin@hq.corp.phoenix.co.il" />
</identity>
</endpoint>
</client>
</system.serviceModel>
---------------------------------------------------
Пробовала использовать это:
1.
2.
3.
4.
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
Ошибка:
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.