Swashbuckle.webapi: Method not found: 'Swashbuckle.Application.SwaggerEnabledConfiguration

Created on 10 Jan 2017  路  6Comments  路  Source: domaindrivendev/Swashbuckle.WebApi

When i am deploying on server below exception is coming
Method not found: 'Swashbuckle.Application.SwaggerEnabledConfiguration Swashbuckle.Application.HttpConfigurationExtensions.EnableSwagger(System.Web.Http.HttpConfiguration, System.Action`1)'.

Meanwhile it is working good in local IIS.

Most helpful comment

I fixed this on my local IIS by adding a binding redirect for System.Net.Http in web.config.
Just make sure the 4.2.0.0 below matches the version of the DLL in your references folder.

<dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0"/>
</dependentAssembly>

All 6 comments

I ran into this same issue. I just posted a comment on #451 on what I did to resolve it.

My fix for this issue came from this thread:

781

Different problem, but same fix

This is what I did to resolve it #451

I fixed this on my local IIS by adding a binding redirect for System.Net.Http in web.config.
Just make sure the 4.2.0.0 below matches the version of the DLL in your references folder.

<dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0"/>
</dependentAssembly>

That worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Misiu picture Misiu  路  3Comments

raaga123 picture raaga123  路  4Comments

calexandre picture calexandre  路  5Comments

josephearl picture josephearl  路  4Comments

djem3000 picture djem3000  路  5Comments