In my local machine i deployed my web part and also i can use it but when i want to use this web part another sharepoint site importing web part shows this error:


Does anybody have any suggestions?

1 Answer 1


Not much info to go buy, but if you imported a custom web part to another SharePoint site, it will not work!

The reason is that the assembly behind the web part is not allowed to run on that site by the safe mode parser (SafeControls in web.config).

Try and install the web part solution in the new SharePoint solution and see if this solves the problem!

  • I wonder why Import/export webpart option is there if you cant import it :S Jul 27, 2012 at 12:44
  • you can actually import/export the webpart properties. But if the webpart is custom and have code, the target farm must know the webpart, and its code.
    – Steve B
    Jul 27, 2012 at 13:08
  • you only export the webpart manifest xml, not the actual source code that it refers. If running on the same machine, and you deploy to the GAC, the code will be there, but it is not allowed to run for the safe mode parser since the IIS web.config does not contain SafeControl entries. This is a security measure to disallow "normal" users (in this case any user with Designer permissions) to upload malicious code to a site. As @SteveB mentions, if the webpart is already installed (and hence registered as safe) you can export the webpart XML, edit it & upload it either to wp gallery or to site. Jul 27, 2012 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.