Problem using SharePoint API in web project ascx

Mar 13, 2008 at 4:49 PM
If I create an ascx from a web project (not web site), and in codebehind I use a simple API code (like SPSite site = SPContext.Current.Site;) the webpart don't load correctly in SharePoint?
Anyone have this problem?
Apr 2, 2008 at 9:26 PM
I had a similiar problem as well, which ended up being a security issue. I needed to GAC and then add the webpart's assembly to the <assemblies> section of the web.config file.

Jan had blogged about this previously:
http://weblogs.asp.net/jan/archive/2004/06/14/155165.aspx