Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Saied 349 posts 674 karma points
    Sep 24, 2015 @ 20:58
    Saied
    0

    Error loading System.Web.Http after deploying to azure?

    Everything works fine on my local machine. Once I deployed to windows azure. I am getting the following error:

    Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    Has anyone run into this problem before and know the fix?

  • Matthieu Nelmes 102 posts 385 karma points
    Sep 24, 2015 @ 22:08
    Matthieu Nelmes
    0

    Check your web.config for:

    <dependentAssembly>
       <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
       <bindingRedirect oldVersion="1.0.0.0-4.0.0.1" newVersion="4.0.0.1" />
    </dependentAssembly>
    
  • Saied 349 posts 674 karma points
    Sep 24, 2015 @ 23:36
    Saied
    0

    After checking my web.config, I have this:

    <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1" />
      </dependentAssembly>
    

    I did do an update to MVC, so before the update, it looked like this:

    <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
    

    I haven't tested it, but what exactly does this do?

Please Sign in or register to post replies

Write your reply to:

Draft