MOSS2007 Blueprint Troubles - HelloWorld

Aug 26, 2008 at 11:46 PM
Hi thanks for reading. I have MOSS2007 and Silverlight tools Beta2, .net 3.5 and not getting my blueprint on, I require some help.

I have followed the tutorials from many sources, most of which either reference WSS instead of MOSS2007 or SilverLight Beta1 and have become confused. I have followed the codeplex FAQ no problem, but I cant seem to deploy the helloworld blueprint there is an error whenever I try to add the webpart (yes, activated the feature) and not sure if I did the web.config right, what are those private keys in there? Can I get a better way to update the web.config?

At first I used a publishing site for my deployment, it was just giving me a blank webpart with a title. I switched to the Blank Web Application, now I get the error;

"Unable to add selected web part(s).  Silverlight 2 Hello World Web Part: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type is not registered as safe."

The blueprint is not quite making it easy for me yet to say the least, please help.

Thanks !
Aug 26, 2008 at 11:50 PM
SilverLight Moss 2007 Integration
Patrick Tisseghem Moss2007 wt SilverLight Configuration How-To local wiki or from... http://www.u2u.info/Blogs/Patrick/default.aspx
silverlight homepage http://silverlight.net/
Steve PieTrek how-tos http://stevepietrek.com/
markharrison blog presentations http://markharrison.co.uk/blog/2007/05/sharepoint-and-silverlight.htm
MS Team Blog Blueprint http://blogs.msdn.com/sharepoint/archive/2008/03/02/announcing-the-silverlight-blueprint-for-sharepoint.aspx
CodePlex Silverlight Blueprint for SharePoint http://www.codeplex.com/SL4SP/Release/ProjectReleases.aspx?ReleaseId=16420
BinaryWave Blogs + Free Utilities http://www.binarywave.com/products/sonar/default.aspx
Chris Johnson Blogs http://blogs.msdn.com/cjohnson/archive/2008/06/07/updated-building-a-simple-asp-net-page-based-sharepoint-application-in-visual-studio-with-the-visual-studio-extensions-for-wss-1-2-with-visual-studio-2008.aspx
Aug 27, 2008 at 5:13 PM
Please help
Coordinator
Aug 27, 2008 at 7:07 PM
I just added a screencast on how to walk through the first sample--this should give you more info. Make sure you have the web.config correct as well. If you haven't got the HelloWorld app registered as a safe control in the web.config it won't work. Take a look at the screencast, and if this doesn't work we can set up a LiveMeeting.
Aug 27, 2008 at 7:32 PM
Thank you so much Patrick! Unfortunately, I am still having trouble with the web.config;

 <SafeControl Assembly="SL.SharePoint.HelloSilverlight2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bb99f30c0098259c" Namespace="SL.SharePoint.WebParts" TypeName="*" Safe="True" />
// how do i add?  <SafeControl Assembly="SL.SharePoint.HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=??WHAT GOES HERE??" Namespace="SL.SharePoint.WebParts" TypeName="*" Safe="True" />

In your screencast, I followed along, I already have the web parts feature enabled, but it seems the webconfig safety mechanism is blocking them. I noticed in the SLHelloWorld.cs file there is a Guid;

namespace SL.SharePoint.HelloWorld
{
    [Guid("d359c723-89b0-4224-8d30-ee4f72898c4f")]


Is this where my key pair is generated, how can i get this web.config going ? Thanks so much!

./b

  (*sidenote - I cant seem to get rid of these webparts, even when i delete my web applications to start fresh)
Coordinator
Aug 27, 2008 at 9:33 PM
Look in the SL.SharePoint.HelloWorld folder and navigate to bin\Debug\solution. You will see a file in there called manifest.xml. Open this file in notepad, and you should find the public token key. The other way to do this is to open two instances of Windows explorer and drag and drop the Sl.SharePoint.HelloWorld.dll from the aforementioned folder into your GAC (the folder open in the other Explorer instance). Then right-click and select Properties. You will see the public token key there.

To remove the web part, go to Top Level Site Settings, Web Parts, and then select the web part you want to delete and click Edit, and then Delete.

Steve
Aug 27, 2008 at 11:40 PM
Thank you Steve, 

I have gotten the HelloWorld working now. The actual line in the web.config had the right public key, I just didnt have the right namespace, which i made to be exactly the name of the webpart. I dont know if that is right but now I can see the webpart. 

Thanks!

<SafeControl Assembly="SL.SharePoint.HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9f4da00116c38ec5" Namespace="SL.SharePoint.HelloWorld" TypeName="*" Safe="True" AllowRemoteDesigner="True" />