Copied to clipboard

Flag this post as spam?

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


  • Mike Stephenson 7 posts 28 karma points
    Feb 09, 2014 @ 04:17
    Mike Stephenson
    0

    can't seem to upload any images

    umbraco 7.0.3 installed through nuget, but can't seem to get any media to upload.  I'm new to umbraco.  Here is the error message:

    [A]System.Net.Http.Headers.ContentDispositionHeaderValue cannot be cast to [B]System.Net.Http.Headers.ContentDispositionHeaderValue. Type A originates from 'System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location 'C:\Users\Mike\AppData\Local\Temp\Temporary ASP.NET Files\root\e4498a76\42625e5c\assembly\dl3\ebdc3a13\4dadf929_3e25cf01\System.Net.Http.dll'. Type B originates from 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http

    Any ideas on what needs to be done to make this work?  

  • Mike Stephenson 7 posts 28 karma points
    Feb 09, 2014 @ 21:14
    Mike Stephenson
    1

    The solution is a binding redirect incorrectly set in the web.config.  

    I changed 2.0.0.0 to 4.0.0.0:

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

    Reference: http://stackoverflow.com/questions/16967134/odd-exception-scenario-system-net-http-mediatypeheadervalue-cannot-be-cast-to-me

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft