Copied to clipboard

Flag this post as spam?

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


  • Levente Kosa 136 posts 352 karma points
    Sep 16, 2015 @ 06:42
    Levente Kosa
    0

    Error after publish

    Hi,

    I have a problem. I have a local version of Umbraco 7.2.8 and it's working perfectly. But the published version on the dev has some error, but I can't figure out what is the problem. This is the error message:

    Could not load types from assembly umbraco, Version=1.0.5675.23471, Culture=neutral, PublicKeyToken=null, errors:
    Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    
    Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    
    Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    

    Does anybody can help me?

  • Steve Morgan 1350 posts 4460 karma points c-trib
    Sep 16, 2015 @ 08:36
    Steve Morgan
    0

    I'd guess your release / publish failed. It looks like it's complaining that you're missing System.Net.Http.Formatting.dll from the bin folder.

    How did you publish? If you published to files and then zipped it up - try unblocking the zip or use 7-zip - I've had issues with Windows blocking files in the zip.

  • Levente Kosa 136 posts 352 karma points
    Sep 16, 2015 @ 21:27
    Levente Kosa
    0

    The dll is there. I tried publish in two different ways: - copy the files to the server manually - VS publish using FTP connection

  • Samira 113 posts 452 karma points
    Sep 17, 2015 @ 04:37
    Samira
    0

    Hi,

    Firstly clean the solution after that build solution and try it hope it is useful

    Grazitti

  • Steve Morgan 1350 posts 4460 karma points c-trib
    Sep 17, 2015 @ 07:33
    Steve Morgan
    0

    Hi,

    Check you have .NET 4.0 installed on your other server.

    run this from a CMD

    dir %WINDIR%\Microsoft.Net\Framework\v*
    

    Kind regards

    Steve

  • Levente Kosa 136 posts 352 karma points
    Sep 17, 2015 @ 08:11
    Levente Kosa
    0

    Local: 4.5 Server: 4.5.2

    Is that good?

  • Steve Morgan 1350 posts 4460 karma points c-trib
    Sep 17, 2015 @ 08:33
    Steve Morgan
    0

    I suspect there is something wrong with your web.config and / or a nuget package. I take it you've tried the solution clean and rebuild as Grazitti suggested already?

    Did you create the VS project using Nuget?

    I'm guessing here - so if anyone else knows the answer please dive in!!

    There are two suggestions in the link below on what to do - I'd try the bottom one first - checking if your web.config has a second reference (backing everything up of course!!) before the package clear out.

    http://stackoverflow.com/questions/22403650/could-not-load-file-or-assembly-system-net-http-formatting-or-one-of-its-depen

  • Levente Kosa 136 posts 352 karma points
    Sep 18, 2015 @ 18:33
    Levente Kosa
    0

    I tried the suggested nuget process, and I also stared to use VS 2015 (because of the newest nuget vesion), and now I get different error in the output box:

     No way to resolve conflict between "System.Net.Http.Formatting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "System.Net.Http.Formatting, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
    1>  Consider app.config remapping of assembly "System.Net.Http.Formatting, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.0.0.0" [] to Version "5.2.3.0" [F:\Projects\frs\frs\bin\System.Net.Http.Formatting.dll] to solve conflict and get rid of warning.
    1>  Consider app.config remapping of assembly "System.Web.WebPages, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "1.0.0.0" [] to Version "2.0.0.0" [F:\Projects\frs\frs\bin\System.Web.WebPages.dll] to solve conflict and get rid of warning.
    1>  Consider app.config remapping of assembly "System.Web.Mvc, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "3.0.0.0" [] to Version "4.0.0.0" [F:\Projects\frs\frs\bin\System.Web.Mvc.dll] to solve conflict and get rid of warning.
    
  • Mikkel Johansen 116 posts 292 karma points
    Sep 18, 2015 @ 19:56
    Mikkel Johansen
    0

    Looks like if you set the references to "Copy Local" it works. It worked for me.

    Found some hints here: http://umbraco.com/follow-us/blog-archive/2014/10/16/getting-a-systemwebhttpapicontroller-error#comment-10380

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies