Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Importing/Installing web part

  Asked By: Giovanni    Date: Jan 15    Category: Sharepoint    Views: 1355

Can someone help me on my problem in installing a web part to my SPS
server? I'm receiving an error message when I tried to drop a web
part I created.

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."

I'm trying to follow the procedures in creating a basic web part from
an article from Microsoft.
I also tried using wppackager to create an MSI file.
I also tried using gacutil.

Any help will be greatly appreciated.

Share: 

 

6 Answers Found

 
Answer #1    Answered By: Edgar Castillo     Answered On: Jan 15

I had exactly the same problem...

In the end the problem  was because I had moved the inetpub directory
from the C drive to the E drive of my SPS Server. Moving it back to the
C drive resolved this.

Hope this helps.

 
Answer #2    Answered By: Jerrod Collier     Answered On: Jan 15

there are two ways of deploying a webpart  in your portal.
One you can do it manually and the next you can deploy it using a cab file.

first method.

create your webpart. copy your .dll into the C:\inetpub\wwwroot\bin directory.
then open the web.config file  under C:\inetpub\wwwroot
and add your webpart to the Safe controls list.
<SafeControls>
<SafeControl Assembly="CustomWebParts, Version=1.0.2.2, Culture=neutral,
PublicKeyToken=8af2443a8fe6763e" Namespace="CustomWebParts" TypeName="*"
Safe="True" />
</SafeControls>

save and close the file.

once you have done this go to WebPart gallery
each site  has its own webpart gallery

For the portal site you can find it under
SiteSettings>Manage security and additional settings> Manage web  Part gallery
for the WSS sites you can find it under
SiteSettings>Go to site administration> Manage Web part  gallery

from the webpart gallery select New Webpart and all webparts registered  as safe
are listed there, select your webpart and choose Populate Gallery.

That does it for you.

Second method.

Create a cab and deployment project to your webpart solution. Right click on
the cab project in the solution explorer and choose Add->Project output. Choose
Primary output and content files from the dialog and select OK.

compile the solution. The cab file will be created.

then using this command from the dos command prompt

stsadm -o addwppack -filename <path and filename of the cabfile> -globalinstall
-force

this deploys the webpart to the required directory and makes entries int he
web.config file.

once you have done this go to WebPart gallery
each site has its own webpart gallery

For the portal site you can find it under
SiteSettings>Manage security and additional settings> Manage Web Part gallery
for the WSS sites you can find it under
SiteSettings>Go to site administration> Manage Web Part gallery

from the webpart gallery select New Webpart and all webparts registered as safe
are listed there, select your webpart and choose Populate Gallery.

 
Answer #3    Answered By: Jacob Green     Answered On: Jan 15

I think it is not applicable to my current setup. Though there could be some connection with the problem  you encountered, meaning my SPS portal could not locate some files (or maybe) needed by my web  part (hmmm, could be).
I tried downloading a third-party web part, deployed it using the wppackager tool, and it was successfully installed (though it is only a basic  web part  compared to the SSO web part I want to create, basically because a lot of configuration settings are needed , e.g. permission for the SingleSignonPermission namespace).
Are there anyone out there who have successfully implement SSO in SPS2K3?
I'm running out of options and solutions, can anybody give some suggestions? I really needed it.

 
Answer #4    Answered By: Spencer Bradley     Answered On: Jan 15

I'm receiving  the error  message:

"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."

I tried the procedures  from the SDK. I'm using the wppackager to create  an MSI file.
Things I tried:
- create a custom policy
- modify and added SafeControls, IPermissions, Code Groups

These worked when I tried creating  an MSI package for a third-party web part.
The one I'm working on is for Single SignON.
Do you happen to have some experience in configuring SSO?

 
Answer #5    Answered By: Jay Ruiz     Answered On: Jan 15

I experienced the same problems as you, though I did not try
SingleSingonPermission etc. Even after adding my web  part to the SafeControls
list in the Web.config file. I was consistently getting the same error  that you
mention. Then I stumbled upon an article  that advised me to add it to the Web
Part gallery.

Now that I think of it, there could be an another possible reason, Is your
application name different from the namespace used in your application. if so
in the Safe controls list you should add namespace.assemblyname as mentioned
below
<SafeControl Assembly="<Namespace>.<AssemblyName>", Version=x.x.x.x,
Culture=neutral,PublicKeyInfo=.xxxxxxxx Namespace=<Namespace> TypeName="*"
Safe="True" />

also you need to make the change in your DWP file.....

hope this solves this problem.

my opinion is, whether your webpart  is using SSP or not should not impact
deployment of the web part  because, it is only verified if the web part is a
safe control  while adding it to the site.

 
Answer #6    Answered By: Graham Ingram     Answered On: Jan 15

You should tyr to elevate the Trust level to Full in the web.config

<trust level="Full" originUrl="" />

 
Didn't find what you were looking for? Find more on Importing/Installing web part Or get search suggestion and latest updates.




Tagged: