나는 또한 셰어 사용자 프로필 서비스를 소비 WCF 서비스가 있습니다. IIS에서 서비스를 실행하려고하면이 오류가 발생합니다. 호스트 ('IntegratedWindowsAuthentication')에 구성된WCF 인증 바인딩 오류
인증 방식은 그 바인딩 'WsHttpBinding과'('익명')를 구성 할 수 없다. SecurityMode가 전송 또는 TransportCredentialOnly로 설정되어 있는지 확인하십시오. 또한 이것은에 ClientCredentialType 속성을 갱신함으로써, 소자에 애플리케이션 구성 파일에서 통해 IIS 관리 툴을 통해이 애플리케이션 인증 께 ServiceHost.Authentication.AuthenticationSchemes 속성 방식을 변경함으로써 해결 될 수있다 , 결합 또는 AuthenticationScheme의 속성을 조정하여 HttpTransportBindingElement.
은 여기 내 Web.config의
<bindings>
<basicHttpBinding>
<binding name="UserProfileServiceSoap" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="HttpBinding1" maxReceivedMessageSize="2147483647" receiveTimeout="10:00:00" openTimeout="10:00:00"
sendTimeout="10:00:00" closeTimeout="10:00:00" bypassProxyOnLocal="false" transactionFlow="false"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288000" allowCookies="false">
<security mode="None"/>
</binding>
<binding name="WSHttpBinding_MessageSecurity" maxReceivedMessageSize="2147483647" receiveTimeout="10:00:00"
openTimeout="10:00:00" sendTimeout="10:00:00" closeTimeout="10:00:00" bypassProxyOnLocal="false"
transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288000" allowCookies="false">
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="">
<extendedProtectionPolicy policyEnforcement="Never"/>
</transport>
<message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
services>
<service name="UserProfileWcf.UserProfileService" behaviorConfiguration="UserProfileWcf.UserProfileServiceBehavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="HttpBinding1" contract="UserProfileWcf.ServiceContract.IUserProfileService" name="UserProfileServiceEndpoint">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="UserProfileWcf.UserProfileServiceBehavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="65536000"/>
<serviceThrottling maxConcurrentSessions="2147483647"/>
</behavior>
</serviceBehaviors>
</behaviors>
<client>
<endpoint address="http://xyz/_vti_bin/userprofileservice.asmx"
binding="basicHttpBinding" bindingConfiguration="UserProfileServiceSoap"
contract="SharePointUserProfileService.UserProfileServiceSoap"
name="UserProfileServiceSoap" />
</client>
같은 구성은 내 로컬 컴퓨터에서 잘 작동합니다. 내 바인딩이 어디에서 잘못 되었습니까?
은 당신이있는 wsHttpBinding과 끝점 중 하나를 정의하는 데 사용했던 구성이 HttpBinding1 없음으로 설정 보안 모드를 가지고있는 생각합니다. 그것은 당신이 IIS에서 서비스를 호스트했을 때 (IIS가 서비스 호스트 역할을하기 때문에), Windows 인증을 사용했을 때입니다. HttpBinding1의 경우 보안 모드를 전송으로 설정하거나 IIS 인증을 익명으로 변경하여 작동하는지 확인하십시오. – vibhu
동일한 구성이 컴퓨터에서 제대로 작동한다고 말하면 개발 환경을 의미합니까? – vibhu
오, 그 사람 (익명 허용). : \ 나는 놀랐다. 나는 작지만 중요한 것을 놓치고 있었다. 고마워요 Vibhu, 답장을 별도로 게시하여 답변으로 표시 할 수 있습니다. – Nanu