Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8695595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:04:44+00:00 2026-06-13T01:04:44+00:00

Following the example in this article: http://blogs.msdn.com/b/yaohuang1/archive/2012/05/21/asp-net-web-api-generating-a-web-api-help-page-using-apiexplorer.aspx I’ve set up everything to provide documentation

  • 0

Following the example in this article: http://blogs.msdn.com/b/yaohuang1/archive/2012/05/21/asp-net-web-api-generating-a-web-api-help-page-using-apiexplorer.aspx

I’ve set up everything to provide documentation for my Web API project but I’m running into an issue. When I try to use @api.HttpMethod I get the error he describes about halfway through the article. He says you have to manually add a reference to the System.Net.Http, Version=2.0.0.0 assembly in the web.config (even though it’s in the References folder by default), but if you follow his example of adding the assembly the traditional way through the tag in web.config….. well you’ll find that is no longer a valid tag in 4.5 and everything is done through AssemblyRedirects. I tried that but to no avail. Anyone having this issue or know how to help with the change in web.config? Did I miss a meeting?

Visual Studio 2012
MVC4 Web API project (not from Nuget, the final release shipped with VS2012)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:04:45+00:00Added an answer on June 13, 2026 at 1:04 am

    Add the below configuration inside your Web.config file under <system.web> node (assuming your app runs on .NET 4.5, targetFramework attribute is set to 4.5):

    <compilation targetFramework="4.5">
      <assemblies>
        <add assembly="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      </assemblies>
    </compilation>
    

    Also add the below one at the root level under <configuration> node:

    <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
          <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" />
          <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
        </dependentAssembly>
      </assemblyBinding>
    </runtime>
    

    This should solve your problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In C following this article ( http://blogs.msdn.com/oldnewthing/archive/2006/12/21/1340571.aspx ), we have succesfully been able to
I am following this example to save the canvas to a PNG file. http://greenethumb.com/article/1429/user-friendly-image-saving-from-the-canvas/
I was following this article: http://msdn.microsoft.com/en-us/library/aa902637%28v=sql.80%29.aspx and my query for distinct count looks like
I'm following this example: http://www.codinghorror.com/blog/2005/12/getting-started-with-indexing-service.html However, the conversion to dataset shows empty columns for
Check this example before reading the question - http://www.sqlfiddle.com/#!2/fcf3e/8 The following data comes from
I was reading the following article: http://java.sun.com/docs/hotspot/gc1.4.2/example.html and have trouble understanding the following lines:
i found the following article http://ayende.com/Blog/archive/2009/04/28/nhibernate-unit-testing.aspx to help me unit test my NHibernate application.
I need a help how to build this example: http://blogs.oracle.com/arungupta/resource/totd154.zip from this tutorial http://blogs.oracle.com/arungupta/entry/totd_154_dynamic_osgi_services
I'm following this example for creating a simple Web application using JAX-RS, MongoDB and
My project contains tagcloud and I am following the sample on: http://www.mikesdotnetting.com/Article/107/Creating-a-Tag-Cloud-using-ASP.NET-MVC-and-the-Entity-Framework My problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.