Derik Whittaker

Syndication

News


Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Sharepoint Web Part Gallery Configuration Gotcha

 In order to add a new web part to Sharepoint 2007 (MOSS) you need to add the assembly information to the <SafeControl> list inside the sites Web.Config file.  When doing so make sure to type carefully.  If you make a mistake when editing the config file, the page will not render correctly. If the page is NOT rendering correctly for you, check the Application Event log for details, this may point you in the right direction.

Pay special attention to the casing for the attributes.  They ARE case sensitive. 

Invalid (namespace is not cased correctly):
<SafeControl Assembly="xxxx, Version=1.0.0.0, Culture=neutral" namespace="xxx" TypeName="*" Safe="True" AllowRemoteDesigner="True" />

Valid (namespace is not cased correctly):
<SafeControl Assembly="xxxx, Version=1.0.0.0, Culture=neutral" Namespace="xxx" TypeName="*" Safe="True" AllowRemoteDesigner="True" />

Just thought I would say my findings/pain with everyone.

Till next time,

 

 

kick it on DotNetKicks.com

Posted 08-29-2007 10:20 AM by Derik Whittaker
Filed under: ,

[Advertisement]

Comments

DotNetKicks.com wrote Sharepoint Web Part Gallery Configuration Gotcha
on 08-29-2007 11:26 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Marcin Hoppe wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 08-29-2007 11:59 AM

That's why it is good to automate Web Part deployment using features. You won't have a chance to make a mistake (or you will make it only once).

Probably it's also good not to use the TypeName="*" construct and specify the type name exactly. The asterisk can bite you when you have an abstract class for a Web Part (it may, for instance, prepare infrastructure for Ajax). It will throw an error in such a case.

Derik Whittaker wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 08-29-2007 12:10 PM

@Marcin,

How do i automate this?  Can you point me in the right direction?

Marcin Hoppe wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 08-29-2007 6:21 PM

One option is to use Visual Studio Extensions for Windows SharePoint Services (aka VSeWSS). It handles generating the feature description, solution manifest and even the wsp solution file (which is really a CAB file), deploying and undeploying the entire shebang for you. It also restarts IIS on every deployment. It takes quite some time and version 1.0 has not been very stable for me. Now there is a version 1.1 CTP but I haven't tried it yet.

Since VSeWSS is not the best solution in the world (although it is better than doing things manually), I decided to prepare the entire build and deployment scripts myself, using NAnt. It also required preparing feature description files, manifest files etc. by hand but it pays off now when I have to deploy more and more things with my Web Part.

I think there is enough material for a couple of posts on this issue. I'll start with a big picture of basic activities during Web Part development and deployment and then delve deeper into details. I think I will start tomorrow but as on Friday I'm coming back home after spending a month in Belfast in my company's headquarters, it may take a couple of days for me to get back on track on this.

Derik Whittaker wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 08-29-2007 6:28 PM

@Marcin,

I actually tried to use the VSeWSS today, but I am not running Server 2003 as my dev enviorment.  I do have a VM running with 2003, but dont really want to develop in my VM.  

Some posts would be great...

Derik

Marcin Hoppe wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 08-29-2007 6:38 PM

Well, I am developing on two Virtual PC machines (one for MOSS and the second one for domain controller, each running Windows Server 2003) and it does the trick (although it is a bit slow).

Are you developing on a different machine than your MOSS installation?

Derik Whittaker wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 08-29-2007 6:49 PM

@Marcin,

Yea, my development box does not have MOSS.  Right now I am kinda in the POC stages.  I am just trying to get my feet wet and figure out what end is up and where to start.  I really don't want to develop on the MOSS VM but i will if i have to.

Marcin Hoppe wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 09-06-2007 3:57 PM

Developing on a VM with MOSS installed is pretty convenient. You can go through the build-deploy-test cycle pretty easily and you can look at your MOSS instance much more easily.

Didrex. wrote Didrex online no prescription.
on 07-30-2008 8:03 AM

Didrex without a prescription. Buy didrex. Didrex.

Arnie wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 05-31-2009 6:18 AM

<a href= yellowspagesuk.portauts.info >yellows pag

Hero wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 06-01-2009 11:09 AM

<a href= babypicsofravensymone.northauts.info >baby pics of raven symone</a>  

<a href= hotelanddiscountscom.peopleauts.info >hotel and discounts com</a>  

<a hr

Aron wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 06-20-2009 9:04 PM

<a href= http://ice+skating+louisville.thanauts.info/ >ice skating louisville</a>  

<a href= http://girl+indian+baby+names.thanauts.info/ >girl indian baby names</a>  

<a href= http://mini+strokes+symptoms.thanauts.info/ >mini strokes symptoms</a>  

<a href= http://the+eagles+logo.thanauts.info/ >the eagles logo</a>  

<a href= http://wells+fargo+home+mortgages.thanauts.info/ >wells fargo home mortgages</a>  

<a href= http://gas+pa+price.thanauts.info/ >gas pa price</a>  

<a href= http://cup+size+a.thanauts.info/ >cup size a</a>  

<a href= http://msnbc+msn+com+nola+site.thanauts.info/ >msnbc msn com nola site</a>  

<a href= http://nevada+reno+volleyball.thanauts.info/ >nevada reno volleyball</a>  

<a href= http://ac+milan+football+club.thanauts.info/ >ac milan football club</a>  

<a href= http://gas+relieving+trapped.thanauts.info/ >gas relieving trapped</a>  

<a href= http://korean+songs+lyrics.thanauts.info/ >korean songs lyrics</a>  

<a href= http://all+she+had+to+do.thanauts.info/ >all she had to do</a>  

<a href= http://city+and+guilds.thanauts.info/ >city and guilds</a>  

<a href= http://nike+dunk+low.thanauts.info/ >nike dunk low</a>  

<a href= http://how+to+work+out+abs.thanauts.info/ >how to work out abs</a>  

<a href= http://what+to+do+about+broken+ribs.thanauts.info/ >what to do about broken ribs</a>  

<a href= http://what+is+a+triplet.thanauts.info/ >what is a triplet</a>  

<a href= http://window+media+player+9+free+download.thanauts.info/ >window media player 9 free download</a>  

<a href= http://rules+for+a+classroom.thanauts.info/ >rules for a classroom</a>

Aron wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 06-20-2009 9:47 PM

<a href= http://condo+rentals+at+north+myrtle+beach.thanauts.info/ >condo rentals at north myrtle beach</a>  

<a href= http://r+kelly+trapped+closet.thanauts.info/ >r kelly trapped closet</a>  

<a href= http://depression+natural+cures.thanauts.info/ >depression natural cures</a>  

<a href= http://orlando+florida+apartment+rentals.thanauts.info/ >orlando florida apartment rentals</a>  

<a href= http://tits+and+dicks.thanauts.info/ >tits and dicks</a>  

<a href= http://converter+kilometer+mile.thanauts.info/ >converter kilometer mile</a>  

<a href= http://home+improvement+retail.thanauts.info/ >home improvement retail</a>  

<a href= http://in+conclusion+the.thanauts.info/ >in conclusion the</a>  

<a href= http://the+knight+of+round+table.thanauts.info/ >the knight of round table</a>  

<a href= http://movie+myspace+layouts.thanauts.info/ >movie myspace layouts</a>  

<a href= http://power+ball+oklahoma.thanauts.info/ >power ball oklahoma</a>  

<a href= http://what+is+a+purchase+order.thanauts.info/ >what is a purchase order</a>  

<a href= http://breed+chicken+picture.thanauts.info/ >breed chicken picture</a>  

<a href= http://hair+meg+ryan+style.thanauts.info/ >hair meg ryan style</a>  

<a href= http://its+goin+down+yung+joc.thanauts.info/ >its goin down yung joc</a>  

<a href= http://themes+for+bedrooms.thanauts.info/ >themes for bedrooms</a>  

<a href= http://com+el+salvador.thanauts.info/ >com el salvador</a>  

<a href= http://translate+free+spanish+english.thanauts.info/ >translate free spanish english</a>  

<a href= http://riverview+plumbing+heating.thanauts.info/ >riverview plumbing heating</a>  

<a href= http://top+and+bottom.thanauts.info/ >top and bottom</a>

Heel wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 06-21-2009 12:09 AM

<a href= http://the+bad+touch+bloodhound.thanauts.info/ >the bad touch bloodhound</a>  

<a href= http://brokeback+mountain+release+dates.thanauts.info/ >brokeback mountain release dates</a>  

<a href= http://jewel+of+the+palace+synopsis.thanauts.info/ >jewel of the palace synopsis</a>  

<a href= http://taco+del+mar.thanauts.info/ >taco del mar</a>  

<a href= http://what+is+a+macy.thanauts.info/ >what is a macy</a>  

<a href= http://the+mechanics+bank.thanauts.info/ >the mechanics bank</a>  

<a href= http://hotel+chicago+ohare.thanauts.info/ >hotel chicago ohare</a>  

<a href= http://master+s+commission.thanauts.info/ >master s commission</a>  

<a href= http://free+porn+sample+video.thanauts.info/ >free porn sample video</a>  

<a href= http://what+is+ngos.thanauts.info/ >what is ngos</a>  

<a href= http://language+courses+italian.thanauts.info/ >language courses italian</a>  

<a href= http://table+and+chair+set+for+children.thanauts.info/ >table and chair set for children</a>  

<a href= http://korean+to+english+translator.thanauts.info/ >korean to english translator</a>  

<a href= http://country+style+ribs+recipes.thanauts.info/ >country style ribs recipes</a>  

<a href= http://doom+3+x+box+cheat.thanauts.info/ >doom 3 x box cheat</a>  

<a href= http://about+othello+shakespeare.thanauts.info/ >about othello shakespeare</a>  

<a href= http://fm+transmitters+for+ipod.thanauts.info/ >fm transmitters for ipod</a>  

<a href= http://ao+dai+nam.thanauts.info/ >ao dai nam</a>  

<a href= http://pictures+of+austrialia.thanauts.info/ >pictures of austrialia</a>  

<a href= http://create+print+greeting+card.thanauts.info/ >create print greeting card</a>

Dominic wrote re: Sharepoint Web Part Gallery Configuration Gotcha
on 08-12-2009 8:41 PM

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)