2012-08-15 3 views
2

Visual Studio에서 http로 잘 실행되는 새로운 WCF 보안 토큰 서비스를 만들었습니다. https를 통해 실행되도록 구성하려고합니다. IIS에서 SSL을 요구하도록 디렉터리 보안을 변경했습니다.HTTPS를 통한 STS (Security Token Service)

http를 통해 서비스를 탐색 할 때 예상대로 "이제 보안 채널을 통해 페이지를 열어야합니다."라는 메시지가 나타납니다. 그러나 https를 통해 서비스를 탐색 할 때 "WS2007HttpBinding 바인딩을 사용하여 끝점에 대한 구성표 http와 일치하는 기본 주소를 찾을 수 없습니다. 등록 된 기본 주소 체계는 [https]입니다."

내가 간과 한 web.config 파일에 구성이 있어야한다고 가정하고 있지만 그게 무엇인지는 잘 모르겠습니다. 이 문제에 도움이된다면 도움이 될 것입니다.

내 web.config 파일은 다음과 같습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 

    <appSettings> 
    <add key="IssuerName" value="ActiveSTS"/> 
    <add key="SigningCertificateName" value="CN=STSTestCert"/> 
    <add key="EncryptingCertificateName" value="CN=DefaultApplicationCertificate"/> 
    </appSettings> 

    <connectionStrings /> 

    <location path="FederationMetadata"> 
    <system.web> 
     <authorization> 
     <allow users="*"/> 
     </authorization> 
    </system.web> 
    </location> 

    <system.web> 
    <compilation debug="true" targetFramework="4.0"> 
     <assemblies> 
     <add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     </assemblies> 
    </compilation> 
    <authentication mode="None"/> 
    <pages> 
     <controls> 
     <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
     </controls> 
    </pages> 
    </system.web> 

    <system.web.extensions> 
    <scripting> 
     <webServices> 
      <authenticationService enabled="true" requireSSL = "true"/> 
     </webServices> 
    </scripting> 
    </system.web.extensions> 

    <system.serviceModel> 
    <services> 
     <service name="Microsoft.IdentityModel.Protocols.WSTrust.WSTrustServiceContract" behaviorConfiguration="ServiceBehavior"> 
     <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /> 
     <endpoint address="IWSTrust13" binding="ws2007HttpBinding" contract="Microsoft.IdentityModel.Protocols.WSTrust.IWSTrust13SyncContract" bindingConfiguration="ws2007HttpBindingConfiguration"/> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost/DemoSTS/Service.svc" /> 
      </baseAddresses> 
     </host> 
     </service> 
    </services> 
    <bindings> 
     <ws2007HttpBinding> 
     <binding name="ws2007HttpBindingConfiguration"> 
      <security mode="Message"> 
      <message establishSecurityContext="false" /> 
      </security> 
     </binding> 
     </ws2007HttpBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="ServiceBehavior"> 
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
</configuration> 

답변

0

https베이스 주소를 추가하십시오. 당신은 IIS를 통해 호스트 인 경우

, 당신은 SSL을 구성하고 HTTPS 채널에 대한 적절한 인증서를 할당해야합니다.

관련 문제