Configuration binding extension 'system.serviceModel/bindings/basicHttpsBinding' could not be found
Solution 1
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.
Solution 2
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.
Solution 3
Remove protocolMapping
section from web.config
and it will work.
Solution 4
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>
Related videos on Youtube
Comments
-
Darian Everett almost 2 years
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:
<system.serviceModel> <behaviors> <serviceBehaviors> <behavior> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <protocolMapping> <add binding="basicHttpsBinding" scheme="https"/> </protocolMapping> <serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true"/>
I tried searching through Google but any answers I could find didn't seem to apply to what I'm doing here. Most of what I found talked about custom bindings, of which I don't think I have any. I'm honestly not even close to sure what could be causing this error, so any help would be greatly appreciated. If you need more information let me know and I'll add it.
-
SageMage over 10 yearsI'm having the same issue. Any help would be much appreciated!
-
slfan over 10 yearsWhat .NET version do you use? BasicHttpsBinding requires .NET 4.5
-
Darian Everett over 10 years@slfan We're using .Net 4.0; what would you suggest I do? Do I just need to remove that protocol mapping section?
-
SageMage over 10 yearsI am using .net 4.0 as well and I tried removing that and it seems to be working now. Please post a answer so I can give you some rep for your help.
-
-
PositiveGuy over 10 yearsso are you saying you only need bsicHttpBinding and ssl will still work?
-
slfan about 10 years@CoffeeAddict the two bindings are very similar. See this thread stackoverflow.com/questions/14874529/… to understand the difference
-
Reg Edit over 7 yearsThis answer is good for a .Net 4.5 app. It's not obvious why it should be necessary to do this, given that we've already said targetFramework="4.5", but it really does seem to be the case that parts of configuration will still default to 4.0 unles we set the target version here as well as in
<compilation>
.