WsFederationHttpBinding 끝 점을 프로그래밍 방식으로 노출하는 WCF 서비스가 있습니다. 그런 다음 Visual Studio를 사용하여 서비스 참조 대화 상자를 사용하여 클라이언트 측 끝점을 만들고 싶습니다. 클라이언트가 올바른 끝점과 바인딩을 생성하지만 STS에 대한 클라이언트 구성에서 바인딩을 수동으로 만들어 연합 된 서비스 바인딩의 발급자 요소에 연결해야합니다. STS 바인딩이 클라이언트에서 자동으로 생성되도록 서버 측 바인딩을 만드는 방법이 있습니까? 내가 코드에서 바인딩을 생성하는 방법이 기본적으로MEX를 통해 WsFederationHttpBinding 끝점에 대한 STS 바인딩을 자동으로 생성 할 수 있습니까?
:
public class MyServiceHost : ServiceHostFactory
{
protected override void AddServiceEndpoint(ServiceHost host, Type contract, Uri address)
{
var binding = new WSFederationHttpBinding();
// set up some binding properties here
binding.Security = new WSFederationHttpSecurity
{
Mode = WSFederationHttpSecurityMode.Message,
Message = new FederatedMessageSecurityOverHttp
{
AlgorithmSuite = SecurityAlgorithmSuite.Default,
EstablishSecurityContext = true,
IssuedTokenType = "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1",
NegotiateServiceCredential = false,
IssuerAddress = new EndpointAddress(
new Uri("http://mydomain/STSService.svc"),
EndpointIdentity.CreateSpnIdentity("http/IDENTITYMASKED")),
IssuerBinding = new WSHttpBinding
{
Name = "stsBinding",
Security = new WSHttpSecurity
{
Mode = SecurityMode.Message,
Message = new NonDualMessageSecurityOverHttp
{
ClientCredentialType = MessageCredentialType.Windows,
NegotiateServiceCredential = true,
AlgorithmSuite = SecurityAlgorithmSuite.Default,
EstablishSecurityContext = false
}
}
}
}
};
host.AddServiceEndpoint(contract, binding, address);
}
}
나는 Visual Studio에서 구성 거기 stsBinding 밤은을이에 대한 프록시를 생성되거나 엮은 경우에이 얻을 수있는 방법이 있나요 MEX가 그것을 허용하지 않습니까?
서비스 측면에서 프로그래밍 방식으로 바인딩에 어려움을 겪고 있습니다. 게시 할 수 있습니까? 정말 멋질거야! – nvoigt
괜찮아요 질문 업데이트 : –