Web part is v3 and inheriting from asp.net web part namespace. It is strongly typed assembly and sitting in GAC but not sure why i see this in ULS logs. my web part is on mytestpage.aspx and has been loaded through Provisioning the aspx page through element.xml file in a feature. Even after this error, web part does show on the page but it does not establish any connection that i am having with another web part. I have the code in feature activation to connect the web parts. it does not show any connection and it does not throw any error in feature activation. It happen only when we do deploy from Visual studio. but if i kick off the WSP through powershell, there is no issue and everything works. Any ideas on the error below?
==============================================
http://mysharepoint/sites/portal/mytestapp/SitePages/mytestpage.aspx - An unexpected error has been encountered in this Web Part. Error: Assemblies that implement ASP.NET Web Parts and are installed into a partially trusted location, such as the bin directory, must be compiled with the AllowPartiallyTrustedCallersAttribute set for import to succeed., DesignText: <webParts> <webPart xmlns="http://schemas.microsoft.com/WebPart/v3"> <metaData> <type name="TestingApp.MyWebPartParameterOverview, TestingApp.MyWebPartParameterOverview, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef17093baabd2656" /> <importErrorMessage>Cannot import this Web Part.</importErrorMessage> </metaData> <data> <properties> <property name="Description" type="string">Trend monitoring plan activity parameters</property> <property name="Title" type="string">Parameter Overview</property> <property name="ChromeType">None</property> </properties> </data> </webPart> </webParts>, SourcePreamble: DWP
Moonis Tahir MVP SharePoint,MCTS SharePoint 2010/2007, MCPD.net, MCSD.net, MCTS BizTalk 2006,SQL 2005