This is a migrated thread and some comments may be shown as answers.

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

1 Answer 140 Views
Integration with other products
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David Nunez
Top achievements
Rank 1
David Nunez asked on 26 Feb 2009, 01:47 AM
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

Thanks

David Nunez

I hope someone of you could help meThanksDavid Nunez

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 27 Feb 2009, 12:11 PM
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.

Regards,
Thomas
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.
Tags
Integration with other products
Asked by
David Nunez
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or