[英]Javascript proxy URL generated by .SVC file does not work under SSL
我在IIS 7.5中部署了一个带有文件Cart.svc的ASP.Net网站(用于从浏览器访问Javascript)。
javascript在非SSL下呈现良好,但SSL导致其暂停。 但是,如果取消了/ js后缀,即使在SSL下也可以使用。 因此,似乎有一个进程正在监听SSL,只是不喜欢/ js后缀。
服务器端错误是;
WebHost failed to process a request.
Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/66851296
Exception: System.Web.HttpException (0x80004005): There was no channel actively listening at 'https://xxxx/ws/Cart.svc/js'. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service
更新2:下面的工作配置
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="MySite.Website.Cart" >
<endpoint address="" behaviorConfiguration="MySite.Website.CartAspNetAjaxBehavior" binding="webHttpBinding" bindingConfiguration="webHttpBinding" contract="MySite.Website.Cart" />
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="webHttpBinding">
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="MySite.Website.CartAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
更新:原始配置如下
<system.serviceModel>
<behaviors>
<endpointBehaviors>
<behavior name="MySite.Website.CartAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
<services>
<service name="MySite.Website.Cart">
<endpoint address="" behaviorConfiguration="MySite.Website.CartAspNetAjaxBehavior"
binding="webHttpBinding" name="CartHttp" bindingName="SslOptionalBinding" contract="MySite.Website.Cart" />
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="SslOptionalBinding">
<security mode="Transport" />
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
提前致谢
瑞安
您是否已设置绑定设置以使用传输级安全性?
<binding name="xxx">
<security mode="Transport"></security>
</binding>
如果您可以发布您的版块,那将会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.