Implementation Problems....

Nov 3, 2009 at 12:38 PM

Hi All,

So I've just been getting my feet wet with SharePoint Development when I found SmartTemplates and was overjoyed that it simplified the craziness that seemed to be the workflow for getting a custom WebPart into SharePoint. Awesome job on that by the way, even for a relative n00b as my self the basic process using SmartTemplates is really easy / understandable. So here's my problem, I'm recieving an error message when I attempt to add my new Web Part to the page. In particular this webpart has a custom editor w/ 1 textbox + string property, I just wanted to test basic editor functionality. As a quick note this is the second error message I have recieved, the first one was: 

Could not load file or asembly << AssemblyName>> or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x8013040).

After some research I found that it was probably a mismatch in one or more of the xml files deployed alongside the webpart. I double checked everything and found that the current .webpart was referencing the old assembly, I switched it and I started recieving the current error message.:

"A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe"

After some looking around it seemed like this most likely had something to do either with the SafeControl entry in the WebConfig or the Trust Level in the WebConfig. I navigated to the file and found that the there is a safecontrol entry that does look like it's showing up correctly.

<SafeControl Assembly="SPHellowWorld, Version=, Culture=neutral, PublicKeyToken=5c7e0117b43b3b20" Namespace="SPHellowWorld" TypeName="*" Safe="True" />

 I also tried changing the Trust Level to full to see if maybe that would help but to no avail.

Just to make sure that basic functionality was working I did a quick test (aka just a basic webpart that outputed some static html) ala the demo video on the front page and it worked flawlessly. So I'm really at something of a loss on how to proceed. If anybody has any insight or possible troubleshooting steps I could go through it would be most appreciated.

Thanks in Advance everybody!


P.S. If it would help, I can post up the code of the webpart that I'm attempting to add