0
我想在https和http上使用wcf。找不到匹配scheme https的基地址。在Visual Studio本地主機上的wcf
我設法配置web.config以在http和https服務器上工作。
問題是wcf不能在visual studio localhost上工作(沒有ssl)。
web.config中這個樣子的
<webHttpBinding>
<binding name="webBinding">
<security mode="Transport">
</security>
</binding>
<binding name="webBindingNotSecure">
<security mode="None">
</security>
</binding>
</webHttpBinding>
,然後2端點的http和https:
<service name="Website.WebServices.ddPoplute">
<endpoint behaviorConfiguration="Website.WebServices.ddPopluteAspNetAjaxBehavior"
binding="webHttpBinding" bindingConfiguration="webBinding" contract="Website.WebServices.ddPoplute">
</endpoint>
<endpoint behaviorConfiguration="Website.WebServices.ddPopluteAspNetAjaxBehavior"
binding="webHttpBinding" bindingConfiguration="webBindingNotSecure" contract="Website.WebServices.ddPoplute" />
</service>
如上面提到的在具有HTTPS一切就好了服務器,但在localhost那沒有ssl我得到錯誤:
Could not find a base address that matches scheme https for the endpoint with binding WebHttpBinding. Registered base address schemes are [http]
如果我用secu刪除端點rity mode =「傳輸」wcf在localhost上工作,但不在https上(在服務器上)。
螞蟻的想法該怎麼辦?
Thnaks
Baaroz