public override ServiceHostBase CreateServiceHost(string constructorString, Uri[] baseAddresses) { string issuerName = WebConfigurationManager.AppSettings["IssuerName"]; string signingCertificateThumbPrint = WebConfigurationManager.AppSettings["SigningCertificateThumbprint"]; string issuerCertificateThumbPrint = WebConfigurationManager.AppSettings["IssuerCertificateThumprint"]; var config = new STSConfiguration(issuerName, signingCertificateThumbPrint, issuerCertificateThumbPrint); Uri baseuri = baseAddresses.FirstOrDefault(x => x.Scheme == Uri.UriSchemeHttps); if (baseuri == null) { throw new FaultException("The STS should be hosed in https"); } WSTrustServiceHost host = new WSTrustServiceHost(config, baseAddresses); host.AddServiceEndpoint(typeof(IWSTrust13SyncContract), STSBinging, baseuri.AbsoluteUri); return host; }
public override ServiceHostBase CreateServiceHost(string constructorString, Uri[] baseAddresses) { string issuerName = WebConfigurationManager.AppSettings["IssuerName"]; string signingCertificateThumbPrint = WebConfigurationManager.AppSettings["SigningCertificateThumbprint"]; string issuerCertificateThumbPrint = WebConfigurationManager.AppSettings["IssuerCertificateThumprint"]; var config = new STSConfiguration(issuerName, signingCertificateThumbPrint, issuerCertificateThumbPrint); Uri baseuri = baseAddresses.FirstOrDefault(x => x.Scheme == Uri.UriSchemeHttps); if (baseuri == null) { throw new FaultException("The STS should be hosed in https"); } WSTrustServiceHost host = new WSTrustServiceHost(config, baseAddresses); host.AddServiceEndpoint(typeof(IWSTrust13SyncContract), STSBinging, baseuri.AbsoluteUri); return(host); }