本文介绍了无法通过https请求进行呼叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在使用包含.svc文件并在https上作为rest api托管的网站。我的问题是:我的网站有SVCUTIL.exe是https:XXXXXXX,但当我用https请求它时,它失败但与http请求工作正常。我不想使用SSL证书谢谢 这是我的webconfig设置: < servicebehaviors > < 行为 名称 = Mybehaviour > < servicemetadata httpsgetenabled = true / > < servicedebug includeexceptiondetailinfaults = true / > < / behavior > < / servicebehaviors > < servicehostingenvironment aspnetcompatibilityenabled = true multiplesitebindingsenabled = true / > < 服务 > < service behaviorconfiguration = Mybehaviour 名称 = PBUIService > < 端点 地址 = https:// XXXXXXXXXXXXXXX behaviorconfiguration = PBBehaviour binding = webHttpBinding bindingconfiguration = wsHttpBindingSettings 合同 = PBUIService > < / endpoint > < endpoint address = mex binding = mexHttpsBinding > contract =IMetadataExchange/> < / endpoint > < / service > < / services > < webhttpbinding > < binding name = wsHttpBindingSettings maxreceivedmessagesize = 2147483647 > < readerquotas maxdepth = 2147483647 maxstringcontentlength = 2147483647 maxArrayLength = 2147483647 maxBytesPerRead = 2147483647 maxNameTableCharCount = 2147483647 / > < / readerquotas > < / binding > < / webhttpbinding > 解决方案 请参阅步骤 - 跨域WCF服务使用AJAX / Ajax调用从HTTP页面调用HTTPS服务(使用JSONP) [ ^ ] I'm using the website which contain .svc file and hosted on https as rest api. My question is: My website has SVCUTIL.exe is https:XXXXXXX but when I call it with https request it fails but working fine with http request.And I don’t want use SSL certificates ThanksThis is my webconfig settings:<servicebehaviors> <behavior name="Mybehaviour"> <servicemetadata httpsgetenabled="true" /> <servicedebug includeexceptiondetailinfaults="true" /> </behavior> </servicebehaviors><servicehostingenvironment aspnetcompatibilityenabled="true" multiplesitebindingsenabled="true" /><services> <service behaviorconfiguration="Mybehaviour" name="PBUIService"> <endpoint address="https://XXXXXXXXXXXXXXX" behaviorconfiguration="PBBehaviour" binding="webHttpBinding" bindingconfiguration="wsHttpBindingSettings" contract="PBUIService"> </endpoint> <endpoint address="mex" binding="mexHttpsBinding"> contract="IMetadataExchange" /> </endpoint></service></services> <webhttpbinding> <binding name="wsHttpBindingSettings" maxreceivedmessagesize="2147483647"> <readerquotas maxdepth="2147483647" maxstringcontentlength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> </readerquotas></binding> </webhttpbinding> 解决方案 Refer the steps at - Cross Domain WCF service Call using AJAX / Ajax Call to HTTPS service from HTTP page (With JSONP)[^]. 这篇关于无法通过https请求进行呼叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-30 22:48