Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ObjectDataSource cannot find type when deployed to SharePoint

I'm receiving the following error when deploying a feature containing ASP.NET pages to our development SharePoint servers:

System.InvalidOperationException: The type specified in the TypeName property of ObjectDataSource 'odsYears' could not be found.

Our .dll is being deployed to the GAC and our pages are being deployed to the the respective Features directory in the 12 hive. We are not receiving this error on our Sandbox SharePoint server. I disassembled the .dll to be sure the class was being deployed and everything looked ok.

Does anyone have any ideas on why this would not work on one of our SharePoint environments?

Thanks.

like image 712
Sean Avatar asked May 01 '10 21:05

Sean


2 Answers

Found the error, I needed to add a reference to our .dll in the "assemblies" node of the SharePoint web.config file - in case anyone else comes across this.

like image 80
Sean Avatar answered Oct 17 '22 00:10

Sean


ObjectDataSource is by default disabled in the SafeControls section of the web.config.

like image 39
Colin Avatar answered Oct 17 '22 00:10

Colin