Re: Web part not safe even if using stsadmin tool
From: Robert Bogue ([*]rbogue[spam]crowechizek[spam]com)
Date: 09/29/04
- Next message: Robert Bogue: "Re: PartCache Randomly Invalidating"
- Previous message: Ziyi: "Re: Move items programmatically within News webpart"
- In reply to: Ted Callander: "Web part not safe even if using stsadmin tool"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Sep 2004 05:12:59 -0500
I've seen the same error when a dependent assembly wasn't loaded or wasn't
trusted. Have you tried firing up your DLL in Reflector?
--
Robert Bogue
Microsoft MVP Server-Networking
MCSE(NT4), MCSE (W2K), MCSA:Security (W2K), CNA, A+, Network+, IT Project+,
Server+, Security+, CDIA+, E-Biz+
Crowe Chizek and Co LLC
"Ted Callander" <mspubsppsdev@callander.se> wrote in message
news:1f9a01c4a4a3$4a4e81a0$a501280a@phx.gbl...
> I have a problem with marking my web part as safe. I have
> created a strongly named assembly which i have put in a
> CAB file together with a manifest.xml and a dwp file. I
> then use STSADMIN tool to import it into the web part
> gallery, using -globalInstall so that it is put in the
> GAC. So far no problem, but when i try to use it on a
> page:
> "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 have checked and it is present in web.config. I can't
> see what is wrong. Below is the contents of my files. Any
> help regarding this would be really appreciated!
>
> ---- JupiterWP2.vb ----
> Imports Microsoft.SharePoint.WebPartPages
> Imports System.Web
> Imports System.Web.UI
> Imports System.Reflection
> <Assembly: AssemblyKeyFileAttribute("tckey.snk")>
> <Assembly: AssemblyVersion("1.0.0.0")>
> Namespace JupiterWP2
> Public Class JupiterWP : Inherits WebPart
> Protected Overrides Sub RenderWebPart(Output as
> HtmlTextWriter)
> Output.Write("Hello, World")
> End Sub
> End Class
> End Namespace
>
> ---- JupiterWP2.dwp ----
> <?xml version="1.0" encoding="utf-8"?>
> <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" >
> <Title>Jupiter WP 2</Title>
> <Description>Jupiter Web Part</Description>
> <Assembly>JupiterWP2</Assembly>
> <TypeName>JupiterWP2.JupiterWP</TypeName>
> </WebPart>
>
> ---- Manifest.xml ----
> <?xml version="1.0"?>
> <WebPartManifest
> xmlns="http://schemas.microsoft.com/WebPart/v2/Manifest">
> <Assemblies>
> <Assembly FileName="JupiterWP2.dll">
> <SafeControls>
> <SafeControl Namespace="JupiterWP2"
> TypeName="*" />
> </SafeControls>
> </Assembly>
> </Assemblies>
> <DwpFiles>
> <DwpFile FileName="JupiterWP2.dwp"/>
> </DwpFiles>
> </WebPartManifest>
>
> ---- Found in web.config after installation ---
> <SafeControl Assembly="JupiterWP2, Version=1.0.0.0,
> Culture=neutral, PublicKeyToken=8e8a8702a12c15b6"
> Namespace="JupiterWP2" TypeName="*" Safe="True" />
>
- Next message: Robert Bogue: "Re: PartCache Randomly Invalidating"
- Previous message: Ziyi: "Re: Move items programmatically within News webpart"
- In reply to: Ted Callander: "Web part not safe even if using stsadmin tool"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|