Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Web Parts Deployment Problem

  Asked By: Judson    Date: Apr 14    Category: Sharepoint    Views: 697

i have read a consise tutorial (wsssdk.chm, from microsoft on how to
develop web parts). now anythime i try to import the web part i get the
following error

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.

when i try also installing it with the web part tool
InstallAssemblies.exe i get errors generating the .dwp files

what could possibly be wrong with the deployment. below is the code i

can u please help me out.

i have made all the entries in the web.config file as ff


<SafeControl Assembly="KPI, Version=, Culture=neutral,
PublicKeyToken=23a6c311525709e9" Namespace="GhanaGoldNetKPI"
TypeName="*" Safe="True" />


the KPI.cs file is like

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Text;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using Microsoft.SharePoint.WebPartPages;

using System.Xml.Serialization;

using System.Web.UI.HtmlControls;

namespace KPI




[XmlRoot(Namespace = "KPI")]

public class NETKPI : WebPart






public string Text




String s = (String)ViewState["Text"];

return ((s == null) ? String.Empty : s);




ViewState["Text"] = value;



protected override void RenderWebPart(HtmlTextWriter output)


output.Write("<hi>Net Ghana KPI</hi>");





the assembly info has this info

using System.Reflection;

using System.Runtime.CompilerServices;

using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the

// set of attributes. Change these attribute values to modify the

// associated with an assembly.

[assembly: AssemblyTitle("NetKPI")]

[assembly: AssemblyDescription("")]

[assembly: AssemblyConfiguration("")]

[assembly: AssemblyCompany("")]

[assembly: AssemblyProduct("NetKPI")]

[assembly: AssemblyCopyright("Copyright © 2006")]

[assembly: AssemblyTrademark("")]

[assembly: AssemblyCulture("")]

[assembly: AssemblyDelaySign(false)]

// Setting ComVisible to false makes the types in this assembly not

// to COM components. If you need to access a type in this assembly from

// COM, set the ComVisible attribute to true on that type.

[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is
exposed to COM

[assembly: Guid("9aa82781-75af-4b9d-bc29-9977a39cea3e")]

// Version information for an assembly consists of the following four


// Major Version

// Minor Version

// Build Number

// Revision


// You can specify all the values or you can default the Revision and
Build Numbers

// by using the '*' as shown below:

[assembly: AssemblyVersion("")]

[assembly: AssemblyFileVersion("")]


the KPI.dwp is like this>>>>>>>>>>>>>>>

<?xml version="1.0"?>

<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">

<Assembly>KPI, Version=, Culture=Neutral,



<Description>developed by ally</Description>





1 Answer Found

Answer #1    Answered By: Lalit Bhattacharya     Answered On: Apr 14

i think you have to place that secured .dll file  in the GAL folder

Didn't find what you were looking for? Find more on Web Parts Deployment Problem Or get search suggestion and latest updates.