Error whith OpenAccess ORM and Sharepoint Web Part Using Web User Control

2 posts, 0 answers
  1. David Nunez
    David Nunez avatar
    1 posts
    Member since:
    Jan 2009

    Posted 25 Feb 2009 Link to this post

    Hi Telerik Friends, I'm currently having trouble while developing a web part for Microsoft Office Sharepoint Server 2007, my target is to retrieve data from a sql server database. I have already created a C# class library project and enabled ORM, this includes persistent classes and Data access code, I have also completed the reverse mapping wizard so my table and objectscopeprovider classes have been created. I embedded app.config and reversemapping.config files into the assembly to be my Data layer dll. Then I have created a Sharepoint solution project, it contains a feature with a web part which loads a web user control. I add a reference to my data layer dll in the solution deploy project and inside my web user control trough register, but i'm getting the next error:

    The ObjectContextProvider named 'DataLayer.ObjectScopeProvider1, DataLayer' could not be resolved.

    I hope someone of you could help me


    David Nunez

    I hope someone of you could help meThanksDavid Nunez
  2. Thomas
    Thomas avatar
    588 posts

    Posted 27 Feb 2009 Link to this post

    Hello David,

    that looks like the DataLayer assembly is not being able to get loaded. Is that a versioning problem?
    What I would do in such a scenario is to include a hard reference to one of the types in the assembly from the referencing thing; a System.GC.KeepAlive(typeof(DataLayer.ObjectScopeProvider1)) should do the trick.
    That informs all participants that this referenced assembly is really needed.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
Back to Top