Getting exception error when running in .Net 2.0 runtime

Page 1 of 2 12 LastLast
  1. #1

    Getting exception error when running in .Net 2.0 runtime



    I've built and targeted 2.0 as the runtime but it falls over with the error below i.e. Json has references to System.Core according to the Stack Trace. If coolite is using Json 2.0 that was built as 3.5 then how can this run under 2.0 Am i missing something in how i'm building and delpoying ?

    Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    
    Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
    
    
    Source Error: 
    
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
    
    
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be loaded.
    
    
    
    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].
    
    
     
    
    
    Stack Trace: 
    
    
    
    [FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.]
       Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value) +0
       Coolite.Ext.Web.JSON.Serialize(Object obj) +177
       Coolite.Ext.Web.ListItemCollectionJsonConverter.WriteJson(JsonWriter writer, Object value) +253
       Coolite.Ext.Web.ClientConfig.ToExtConfig(PropertyInfo property, Object obj, ClientConfigAttribute attr) +4012
       Coolite.Ext.Web.ClientConfig.Process(Object obj
  2. #2

    RE: Getting exception error when running in .Net 2.0 runtime

    You need to have the Microsoft .NET Framework 3.5 installed on your machine, you can download the framework free from Microsofts website; and its a boot pack for 2.0.

    Click here to download

    Let me know if you have any questions.

    Cheers,
    Timothy
  3. #3

    RE: Getting exception error when running in .Net 2.0 runtime

    I've got 3.5 on my machine, running VS 2008, it's on the hosting machine that the problem is. Are you saying that we must have 3.5 on that machine ? If so why would we need (or anybody else) build to 2.0 ??

  4. #4

    RE: Getting exception error when running in .Net 2.0 runtime

    Hi Steve,

    Scott Hanselman has a post which speaks to adding the .NET 3.5 System.Core.dll to your projects /bin/ folder, see http://www.hanselman.com/blog/Deploy...nASPNET20.aspx


    That may solve the problem, although he provides a list of disclaimers regarding the technique. 


    I'm doing some more research as well.


    Geoffrey McGill
    Founder & CEO
  5. #5

    RE: Getting exception error when running in .Net 2.0 runtime

    The problem is that they are not my servers, i can certainly try and convince them but the disclaimers are bound to make them nervous. I'd do it in a flash of course ;)

    Does this then confirm that we need 3.5 in some guise or another to run coolite ? I'm curious how you and Timothy are running as you've both intimated to me that you're running on runtime 2.0 servers ??

  6. #6

    RE: Getting exception error when running in .Net 2.0 runtime

    I've confirmed that the web app is running under .NET 2.0, although I've also confirmed that the .NET 3.5 framework has been installed on the server. Probably got installed via Windows Update.

    It does appear that the .NET 3.5 framework must be available on the server, although the application does not necessarily need to run under .NET 3.5.

    I'm still investigating.
    Last edited by geoffrey.mcgill; Feb 22, 2011 at 3:35 AM.
    Geoffrey McGill
    Founder & CEO
  7. #7

    RE: Getting exception error when running in .Net 2.0 runtime

    thanks Geoffrey, i'm crossing my fingers here over the pond.

  8. #8

    RE: Getting exception error when running in .Net 2.0 runtime



    Hi Geoffrey,

    JohnBartram has just joined the forum but can't reply in this forum due to his status, he's the developer guy that i've been working with, this is the post he wanted to make...

    [postbyproxy]

    Hi there,


    As a developer with the company responsible for the hosting of the application that will ultimately contain the coolite components, I thought it might help to explain our situation?


    The coolite dependant application is hosted on a shared platform along with a number of other varied applications that we have developed for our other clients. The common factor is that they have all been developed in .Net 2.0, unfortunately the next step in progressing the .Net versions all require that .Net 2.0 SP1 is applied and it is known that this introduced a number of changes to the framework that we, as the developers of the applications, would have to take account of and ultimately have to regression test for each individual project.


    While in the future we will be doing this, the resource in both time and manpower is considerable, and until that time we cannot jeopardise the stability of the applications hosted on our servers.


    We have attempted to rebuild both the coolite and json assemblies in .Net 2.0 however there is a dependency within the required implementation of JSON that needs .Net 3.5 ? hence we seem to be a little stuck?


    Thanks for your time


    John Bartram


    [/postbyproxy]

  9. #9

    RE: Getting exception error when running in .Net 2.0 runtime

    Hi Steve,

    Ya, from everything I've read, the .NET 3.5 framework must be installed on the machine. The IIS application does not necessarily need to run under .NET 3.5, but I guess the call to System.Core.dll (.NET 3.5) must be available. That's all very unfortunate. Adding the System.Core.dll to the projects /bin/ folder as outlined by Hanselman does seem like a good solution and "theoretically" should be sandboxed and not escape outside the walls of the current iis application. But, of course, that would be best tried on a box with a fairly low "oh shit... what have I just done??" factor.

    The Coolite.Ext.Web Project started with Json.NET 1.3.1 and we did not upgrade to Json.NET 2.0 until our v0.5 release. If I remember correctly, I think one area in Json.NET that changed from 1.3 -> 2.0 was inheriting from the JsonConverter class. You might need to make a few "adjustments" to our JsonConverter extensions in \trunk\Coolite.Ext.Web\Utility\JsonConverter\ to regress them back to the Json.NET 1.3 signature, although I have a sneaky suspecion they might just compile untouched.

    Just drop a compiled Json.NET 1.3.x .dll into the following location:

    \Coolite.Toolkit\trunk\Coolite.Ext.Web\Build\Resou rces\ReferenceAssemblies\Newtonsoft.Json\

    You'll have to delete and then re-add the Project Reference to the new Json.NET assembly. I believe the Assembly must also be StrongNamed (signed) or Coolite.Ext.Web might choke, but maybe not.

    Geoffrey McGill
    Founder & CEO
  10. #10

    RE: Getting exception error when running in .Net 2.0 runtime

    Hi Geoffrey,

    I think we tried something along these lines already, i.e. reverting back to Json 1.3.1 and i think there was only 1 reference that caused any problems and that was to JsonTextWriter() so i think i'll need to trawl back and see what that was originally and see if we can make adjustments, bit tricky though as it's gonna be a bit hit and miss especially with my experience. Still, worth a try though.

    I'll let you know. If it's ok i may end up posting a couple of related questions within this topic to see if it prompts any memories or suggestions.


Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: Nov 21, 2011, 8:51 AM
  2. IE Error : Stop running this script?
    By pooja in forum 1.x Help
    Replies: 5
    Last Post: Nov 07, 2011, 7:22 AM
  3. Error running - Sitemap Sample
    By CoolNoob in forum 1.x Help
    Replies: 0
    Last Post: Aug 27, 2009, 7:03 PM
  4. Error when running a published application
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Nov 18, 2008, 3:22 AM
  5. [CLOSED] Error after running new build
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 15, 2008, 8:07 AM

Posting Permissions