UserControl error could not load type in SharePoint

by Bas Hammendorp 18. February 2010 04:59

So I was building my user control in SharePoint, no rocket sience I thought. When I opened my default.aspx page with the user control, the error 'could not load type ...' is shown. After some struggling and experimenting, I found out that my dll which was deployed in the GAC needed to be moved into the BIN folder.

Maybe there is a good explanation for this, but I have no clue ;) So my conclusion is to deploy the ASCX / ASPX code behind assemblies in the BIN folder of the web application.

Have fun!

Update 4 March 2010: Also when you get the error 'Could not load type ...' from a code behind file in for example a masterpage, try to move the assembly to the BIN folder

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

asp.net | Sharepoint

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

My name is Bas Hammendorp, I work as an Enterprise Engineer at PGGM. My specialties are ASP.NET, C#, SQL and Sharepoint 2007.

Google ads