Share o=(^.^)=o Point

This site documents a noob's discovery journey on sharepoint portal server 2003. Replace all square brackets ([) with triangle brackets (those used in webscripts).

Tuesday, September 27, 2005

A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe.

Situation: You have just finished compiling your web part in VS.NET and can't wait to see it appear on your site, but after you import your web part, you can't upload it because it's not safe.

Cause: 1. Security settings incorrect. 2. DLL file not found.

Solution: 1. Open c:\inetpub\wwwroot\mysharepointdir\web.config. Make sure you have a safe control entry which looks something like this:

[SafeControl Assembly="LibOnline, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9929f92c6f109109" Namespace="LibOnline" TypeName="*" Safe="True"/]

Scroll further down, change the trust level to Full. By default, it's WSS_Minimal, like this:

[trust level="Full" originUrl="" /]

2. Copy and paste the DLL file for your webpart from the default project\bin\Debug directory into c:\windows\assembly OR set the build output path for the project to c:\inetpub\wwwroot\mysharepointdir\bin.

If the webpart used to work but suddenly doesn't work, it could be due to the static IP address on the server. As such, go to IIS Manager, right click your site, click properties, under the Web Site tab, select "(All Unassigned)" for IP address. When accessing the site, use http://servername/sitename.

0 Comments:

Post a Comment

<< Home