我正在尝试在IIS中的单独网站上托管WCF Web服务,其中https为443作为唯一绑定.
当我在使用绑定(http(80)/ https(443))的网站中使用它时,以下配置很有效.如果我删除http绑定,它会开始抛出以下错误.
无法通过绑定BasicHttpBinding找到与端点的scheme http匹配的基址.注册的基地址方案是[https].
如何在仅具有https绑定的IIS网站中使其工作?
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="defaultBasicHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Certificate" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/ERPService/retailPayment.svc"
binding="basicHttpBinding" bindingConfiguration="defaultBasicHttpBinding"
contract="RetailPaymentService.RetailPayment.SVRetailPaymentService" name="EnterpriseRetailPayment" />
</client>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceTypeBehaviors">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior>
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="MyEndPointBehavior">
<!--<SchemaValidator enabled="true"/>-->
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service name="SettlementSalesCollection.SaleItemService" behaviorConfiguration="MyServiceTypeBehaviors">
<endpoint behaviorConfiguration="MyEndPointBehavior" binding="basicHttpBinding"
name="SettlementSalesCollection"
contract="SettlementSalesCollection.CITransactionSettlementListenerService" />
<endpoint name="mexEndpoint" contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service> …Run Code Online (Sandbox Code Playgroud) 我需要获取最后一行中结果集的所有列值的总和.
这是我的SQL查询.
select Master_Code, SUM(Jan), SUM(Feb), SUM(Mar)
from dbo.foobar
WHERE Participating_City = 'foofoo'
GROUP BY Master_Code ORDER BY Master_Code ASC
Run Code Online (Sandbox Code Playgroud)
这样的事情:
Master_Code Jan Feb Mar
1 4 5 6
2 5 5 5
Total 9 10 11
Run Code Online (Sandbox Code Playgroud)