我的WCF服务使用WebInvoke属性并使用httpGetEnabled。
[OperationContract]
[WebInvoke(Method="POST", UriTemplate = "/Function1")]
void Function1(Stream input);
[OperationContract]
[WebInvoke(Method="POST", UriTemplate = "/Function2")]
void Function2( Stream input );当我试图让它与https一起工作时,我无法访问UriTemplates。但是,我可以访问svc和wsdl。
<services>
<service behaviorConfiguration="SslBehavior" name="MyService">
<endpoint address="" binding="webHttpBinding" contract="IMyService" behaviorConfiguration="WebBehavior" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="SslBehavior">
<serviceMetadata httpsGetEnabled="True" />
<serviceDebug includeExceptionDetailInFaults="True"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="WebBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>此服务托管在IIS 7中,有明显的遗漏吗?我尝试了尽可能多的配置组合。当我试图发布到其中一个WebInvoke链接,我会得到一个404错误。
另一家公司将发布到此服务,这就是为什么它必须是RESTfull。
编辑
我确实在绑定节点中尝试过这样的方法:
<webHttpBinding>
<binding name="SslBinding" transferMode="Streamed">
<security mode="None">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>并在端点上设置BindingConfiguration。同一议题:(
发布于 2011-10-25 20:29:42
尝试将seucrity模式设置为传输:
<bindings>
<webHttpBinding>
<binding name="SslBinding" transferMode="Streamed">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>https://stackoverflow.com/questions/7895392
复制相似问题