none
System.BadImageFormatException FileName=System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a RRS feed

  • Question

  • System.BadImageFormatException was unhandled
      FileName = System.Web, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
      Information ==== FusionLog state prelinking ===
    LOG: User = GORFI \ Gorfi
    LOG: DisplayName = System.Web, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
     (Fully-specified)
    LOG: AppBase = file :/ / / C :/ Users / gorfi / documents / visual studio 2010/Projects/ConsoleApplication1/ConsoleApplication1/bin/Debug /
    LOG: Initial PrivatePath = NULL
    Calling assembly: ChatterBotAPI, Version = 1.1.4275.25904, Culture = neutral, PublicKeyToken = null.
    ===
    LOG: This bind starts in default load context.
    LOG: No application configuration file located.
    LOG: Using machine configuration file from C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ config \ machine.config.
    LOG: Post-policy reference: System.Web, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
    LOG: The same link was seen before and failed with hr = 0x80131018.

      Message = Could not load file or assembly 'System.Web, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a' or one of its dependencies. The module should contain an assembly manifest.
      Source = ChatterBotAPI
      StackTrace:
           in ChatterBotAPI.Utils.ParametersToWWWFormURLEncoded (IDictionary `2 parameters)
           in ChatterBotAPI.CleverbotSession.Think (ChatterBotThought thought)
           in ChatterBotAPI.CleverbotSession.Think (String text)
           in ConsoleApplication1.Module1.Main () in C: \ Users \ gorfi \ documents \ visual studio 2010 \ Projects \ ConsoleApplication1 \ ConsoleApplication1 \ Module1.vb: line 18
           in System.AppDomain._nExecuteAssembly (Assembly assembly, String [] args)
           in System.AppDomain.ExecuteAssembly (String assemblyFile, Evidence assemblySecurity, String [] args)
           in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly ()
           at System.Threading.ThreadHelper.ThreadStart_Context (Object state)
           at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state)
           in System.Threading.ThreadHelper.ThreadStart ()
      InnerException:

    Tuesday, January 22, 2013 6:48 PM

All replies

  • There's various reasons this could happen - 

    Is your application targetting the client profile?  Make sure it's targeting ".NET Framework 3.5sp1" and not "Client Profile", as system.web will always fail to load in the client profile...


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Tuesday, January 22, 2013 6:52 PM
    Moderator
  • Thanks for the reply!

     I am having multiple problems with system.web

    For example when i try to run the program xsplit:

    Exception Source:      XSplit.Core
    Exception Type:        System.BadImageFormatException
    Exception Message:     Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
    Exception Target Site: AddRequiredQueryStrings

    Tuesday, January 22, 2013 7:01 PM
  • Thanks for the reply!

     I am having multiple problems with system.web

    For example when i try to run the program xsplit:

    Exception Source:      XSplit.Core
    Exception Type:        System.BadImageFormatException
    Exception Message:     Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest.
    Exception Target Site: AddRequiredQueryStrings

    It sounds like you may have a corrupted .NET install - you could try doing a repair of your .NET framework installation...


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Tuesday, January 22, 2013 7:07 PM
    Moderator
  • Thanks for the reply!

     I am using Windows 8

    What i did:
    .Disabled .Net Framework 3.5 in windows resources (reboot)
    .Executed .Net Framework Clean Up Tool (reboot)
    .Installed .Net Framework 1.1
    .Installed .Net Framework 1.1 SP1 (reboot)
    .Enabled .Net Framework 3.5 in windows resourses (reboot)
    .Tried again, same problem. ('System.Web, Version=2.0.0.0, Culture=neutral...) 

    Tuesday, January 22, 2013 7:24 PM
  • You probably set some reference to copy local. Try target anyCPU and remove copy local from all references.


    Visual C++ MVP

    Tuesday, January 22, 2013 9:38 PM
  •  I am having this problem with multiple .net projects. 

     In the case of xsplit, i cant change this information, the project is already compiled.

    Tuesday, January 22, 2013 10:16 PM

  • You will get BadImageFormatException when your assembly (Here System.web) is not in correct format, so here also I am suspecting the same problem, please check your system.web assembly with Coreflags.exe, also check the assembly with ildasm.

    Naman

    Wednesday, January 23, 2013 9:09 AM
  • Hi Gorfidroas,

    Welcome to the MSDN Forum.

    Please try to install .net Frame work 3.5 again: http://www.microsoft.com/en-us/download/details.aspx?id=21 

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, January 23, 2013 12:15 PM
    Moderator
  •  The only way i am able to install net framework 3.5 again is using this screen

    http://goo.gl/tiOKv

     In windows 8 when i execute the .net 3.5 setup i get a msg saying i need to install .netframework to execute the program.

    Wednesday, January 23, 2013 3:05 PM
  • Hi Gorfidroas,

    Would you like to try this tutorial: http://msdn.microsoft.com/en-us/library/hh506443.aspx ?

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 24, 2013 3:12 AM
    Moderator
  •  Thanks for the reply!

     I already did this 3 times!

     Still have the same system.web problem 

    I am using windows 8 64bits.

    Thursday, January 24, 2013 4:20 AM
  • Hi Gorfidroas,

    Here is a dedicated forum for installing .net framework: http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/threads 

    You can try this installation question on that forum, and when this installation issues resolved, keep follow up this thread, please.

    Thank you.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 24, 2013 5:46 AM
    Moderator
  • Thanks for the reply.

    Question asked: http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/7267c7a0-dcec-4277-a1ad-4c46201fb06f

    I will update if i fix this problem, thanks.

    Thursday, January 24, 2013 2:59 PM