我有一個基於WCF的Web API在Windows Server 2012 iis上運行。 和我最近試圖刪除HTTP,突然我得到System.ServiceModel.ServiceActivationException錯誤。如果我添加http綁定,它再次工作。當http綁定被刪除時,繼續得到System.ServiceModel.ServiceActivationException
我該如何解決這個問題才能在https上運行它?感謝您的幫助!
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="appveripad" value="xx"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="2147483647" executionTimeout="3600" useFullyQualifiedRedirectUrl="true" />
<customErrors mode="Off" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<standardEndpoints>
<webHttpEndpoint>
<standardEndpoint name=""
transferMode="Buffered"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647"
defaultOutgoingResponseFormat="Json"
helpEnabled="true"
automaticFormatSelectionEnabled="true">
<readerQuotas maxDepth="64"
maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647"
maxBytesPerRead="2147483647"
maxArrayLength="2147483647" />
</standardEndpoint>
</webHttpEndpoint>
</standardEndpoints>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
將安全模式設置爲「傳輸」? – Tim