none
OracleConnection in System.data.Oracleclient is not marked as Serializable RRS feed

  • Question

  • Hi ,

       My environment : ws 2003, asp.net ,c#, vs2008 ,moss 2007, oracle 9i

    I am trying to bind a datasource to a listitem after geting the data from oracle data base....am using ado.net to extract data out of oracle DB.

    The data on tracing shows it is  binding to list on databind....but at the time of dispalying in the browser it showing error

     

    "The type System.Data.OracleClient.OracleConnection in Assembly System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral,PublicKeyToken=b77a5c561934e089 is not marked as serializable."

     

    what might have gone wrong ? How do i mark it serializable?

    the application was working fine with the same code outside sharepoint( I formated aspx page and put them in to the _layout folder for housing it under MOSS 2007)....

    Now it showing the above error!!!.....

    First error it showed the dataaccess class(ado.net) was not marked serializable!!!!.... When i

    marked the class serializable by adding [Serializable] tag with in the class it started showin the above ( bold) error

     

    Kindly suggest a solution

    Monday, May 31, 2010 7:46 PM

Answers

  • Hi pokenda,

       Welcome to MSDN forums! I'm glad to see your active participation and discussion in MSDN forums. First please refer to http://msdn.microsoft.com/en-us/library/ms971506.aspx.  Second you will now need to modify the .NET machine.config file to add the   System.Data.OracleClient to the assembly list so that your application referencing   the DLL can compile. Find your \WINNT\Microsoft.NET\Framework\vXX.XX.XXX\CONFIG\Mahcine.config file and open in textddit. Search <Compilation> section, find the subs tag<Assemblies>and add the following tag to the list of assemblies: Hope this will help you!  

    <add   assembly= "System.Data.OracleClient,   Version=1.0.3300.0,   Culture=neutral,   PublicKeyToken=b77a5c561934e089 "   />

     

       If you still have any doubt and concern about this issue, please let me know. If I misunderstood you, please kindly elaborate your question.

     

     


    Please Mark as Answered If this is helpful Or Un-Mark as Answered if it is not helpful.

    Best Regards,
    Yan Jun
    Microsoft Online Community Support

    • Proposed as answer by Fafafaalex Thursday, June 3, 2010 6:15 AM
    • Marked as answer by Fafafaalex Monday, June 7, 2010 6:28 AM
    Thursday, June 3, 2010 5:35 AM

All replies

  • Hi pokenda,

       Welcome to MSDN forums! I'm glad to see your active participation and discussion in MSDN forums. First please refer to http://msdn.microsoft.com/en-us/library/ms971506.aspx.  Second you will now need to modify the .NET machine.config file to add the   System.Data.OracleClient to the assembly list so that your application referencing   the DLL can compile. Find your \WINNT\Microsoft.NET\Framework\vXX.XX.XXX\CONFIG\Mahcine.config file and open in textddit. Search <Compilation> section, find the subs tag<Assemblies>and add the following tag to the list of assemblies: Hope this will help you!  

    <add   assembly= "System.Data.OracleClient,   Version=1.0.3300.0,   Culture=neutral,   PublicKeyToken=b77a5c561934e089 "   />

     

       If you still have any doubt and concern about this issue, please let me know. If I misunderstood you, please kindly elaborate your question.

     

     


    Please Mark as Answered If this is helpful Or Un-Mark as Answered if it is not helpful.

    Best Regards,
    Yan Jun
    Microsoft Online Community Support

    • Proposed as answer by Fafafaalex Thursday, June 3, 2010 6:15 AM
    • Marked as answer by Fafafaalex Monday, June 7, 2010 6:28 AM
    Thursday, June 3, 2010 5:35 AM
  • So this will allow the OracleConnection object to be serializable?
    Thursday, May 26, 2011 5:42 PM