2013-05-15 3 views
2

최근 개발 IIS 서버에서 HTTP 및 HTTPS 모두에 대해 올바르게 작동하는 WCF 서비스에 HTTPS를 추가했습니다. 그러나, 지금은 비주얼 스튜디오 (로컬 호스트), I는 서비스 맞추려고이 오류 받고 있어요 사용하여 실행하려고하면 다음SSL로 인해 Visual Studio에서 WCF 서비스가 작동하지 않습니다.

Exception: System.InvalidOperationException 
Description: Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]. 
Timestamp: 5/15/2013 4:23:04 PM 
Client IP Address/DNS Name: ::1 - ::1 

at System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Binding binding, UriSchemeKeyedCollection baseAddresses) 
at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress, Boolean skipHost) 

나의 Web.config의이다 :

<system.serviceModel> 
    <bindings> 
    <webHttpBinding> 
     <binding name="sslBinding"> 
     <security mode="Transport"> 
      <transport clientCredentialType="None" proxyCredentialType="None" /> 
     </security> 
     </binding> 
    </webHttpBinding> 
    </bindings> 
    <services> 
    <service behaviorConfiguration="ServiceBehavior" name="HistoryService"> 
     <endpoint behaviorConfiguration="webHttp" binding="webHttpBinding" contract="IHistoryService" /> 
     <endpoint binding="webHttpBinding" contract="IHistoryService" behaviorConfiguration="webHttp" bindingConfiguration="sslBinding" /> 
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
    </service> 
    </services> 
    <behaviors> 
    <endpointBehaviors> 
     <behavior name="webHttp"> 
     <webHttp /> 
     </behavior> 
    </endpointBehaviors> 
    <serviceBehaviors> 
     <behavior name="ServiceBehavior"> 
     <serviceMetadata httpGetEnabled="true" /> 
     <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 
    </serviceBehaviors> 
    </behaviors> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> 
</system.serviceModel> 

이 Visual Studio의 dev 서버를 사용하여 계속 개발할 수 있다면 매우 좋을 것입니다. Visual Studio Development Server에서 HTTPS와 작동하도록 설정해야하는 것이 있습니까? 또는 web.config에서 수정할 수있는 무언가가 있습니다.

답변

6

Visual Studio의 내장 웹 서버가 SSL을 지원하지 않습니다. 다음은 IIS Express 사용에 대한 유용한 자습서입니다. 나는 IIS Express를 사용하여 사이트를 간단하게 설정하는 Microsoft WebMatrix를 사용합니다.

http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx

+0

것은 나는이에 대한 IIS Express를 사용하지 않았다고 생각하지만, 그 링크는 쉽게 모든 것을 설정했다. 감사! –

관련 문제