How-To Manually Configure Web.Config For SmartPart?

Jul 31, 2008 at 7:52 PM
Hello,

I'm new to Sharepoint 2007, and I'm stuck on a problem.  I hope someone can help.

Our test environment completely crashed, and we had to work with Microsoft to manually restore the entire site, including the databases.  However, ever since we manually restored the site, I can't use SmartPart or SmartPart for AJAX when I'm creating new SharePoint site collections. 

What happens is when I try to add a SmartPart web part on a page, I get the following error:
    Unable to add selected web part(s)

    SmartPart: A Web Part or Web Form Control on this Page cannot be displayed or imported.  The type is not registered as safe.

A similar error occurs when I try to add a SmartPart for AJAX web part on a page. 

I'm guessing that there's something that I may need to do with the web.config or the configuration in order for it to work, but I'm not sure what I need to add or change.  

What do I need to have in the web.config in order for SmartPart to work, other than changing the security to WSS_Medium?  Do I actually have to configure SmartPart elsewhere? Do I have to re-install SmartPart on the server?

Additional Information:
- I'm currently using a custom security policy because I am using custom web parts that I've developed, and I want to keep it as secure as possible.
- I'm using NET 2.0.
- I do have a usercontrols directory in the inetpub\wwwroot\wss\VirtualDirectories\my port number for the site
- I already compared the production environment's web.config with my environment, and I didn't find any differences other than I'm using a custom policy.

Thanks in advance for your help!
Jennifer
Sep 19, 2008 at 2:39 PM
Does ajax and smartpart work in the production env?  If so, then your web.config is probably fine.  If not, then you need to change the web config.  You can google for instructions on that.  Also, look in the gac and make sure returnofSmartPart is there.  If not, you need to reinstall.