Configuration binding extension 'system.serviceModel/bindings/basicHttpsBinding' could not be found

后端 未结 4 1963
旧时难觅i
旧时难觅i 2021-02-07 04:21

I am getting this error when I try to navigate to my .svc file. It appears that it\'s not finding my basicHttpsBinding; here\'s that section of my web.config:

&         


        
相关标签:
4条回答
  • 2021-02-07 04:56

    If you have a similar scenario as mine where the Visual Studio-generated Web.config has the following configs:

      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <pages controlRenderingCompatibilityVersion="4.0" />
      </system.web>
    

    ... add <httpRuntime targetFramework="4.5" />

    So that you now have

      <system.web>
        <compilation debug="true" targetFramework="4.5" />
        <pages controlRenderingCompatibilityVersion="4.0" />
        <httpRuntime targetFramework="4.5" /> 
      </system.web>
    

    I also went on to remove <pages controlRenderingCompatibilityVersion="4.0" /> with no impact in my situation.

    0 讨论(0)
  • 2021-02-07 05:00

    Remove protocolMapping section from web.config and it will work.

    0 讨论(0)
  • 2021-02-07 05:07

    BasicHttpsBinding is a new binding in .NET 4.5, therefore you cannot use it in a 4.0 application. Either you remove the protocolMapping or you use another binding such as basicHttpBinding or wsHttpBinding.

    When you configure SSL in IIS, this should work as well.

    0 讨论(0)
  • 2021-02-07 05:10

    if you use framework 4.5 or up you can add below code to your web.config

    The following attributes can be set on the tag.

      <system.Web>
        <httpRuntime targetFramework="4.8" />
      </system.Web>
    
    0 讨论(0)
提交回复
热议问题