SharePoint Tips and Tricks, Best Practices and Recommendations

Posted: by

Comments

Mitch Denny said:

Hi Michael,

Sounds like you are taking it in your stride!

# October 5, 2007 6:00 AM

Michael said:

Do I have any alternatives? Neville and Chris will tell you about my everydays whimpering and WTFing to SharePoint :)

Thanks to Rob and Adam for gettin' me into this gamble ;)

# October 5, 2007 6:16 AM

Grant said:

I can also recommend Bill English's Sharepoint Administrator's companion book from an infrastructure point of view. It was a vital resource for me getting up to speed with it all.

www.amazon.com/.../0735622825

# October 5, 2007 7:55 AM

Steve Clements said:

Hi,  Nice list, I am new to Sharepoint dev and have been using VS 2008 since it came out and I aint going back to 2005 just for SP. I have been seriously peed off by the lack of support for tools in VS2008 from MS.  Your list sweetens the taste a little.

Thx

# May 29, 2008 12:38 PM

Volodymyr M. Shcherbyna said:

Congrats :) and welcome to the club!

# July 2, 2008 2:13 AM

JC said:

Thanks for posting this.  It saved me what probably would have been hours. :-)

# July 17, 2008 8:24 AM

Carlos said:

Thanks for posting this, but i have a scriptmanager for ajax and this script fail. Do you know how can i slove it?

# July 17, 2008 3:43 PM

Michael said:

Do you have SP1 installed?

Did you change the web.config to add all AJAX specific stuff, like httphandlers?

If everything done and  and you put ScriptManager, then what exception do u have?

# July 17, 2008 4:19 PM

Darren Neimke said:

Nice tip... thanks for sharing Michael!

# July 28, 2008 4:21 PM

Paul Noone said:

Thank God this is a bug. I thought I was simply going mad. :)

# August 14, 2008 6:06 PM

Aaron Saikovski said:

also dont forget to mention the prescan tool!

# September 24, 2008 9:05 PM

Chris said:

Hi,

I converted a List view to an XSLT data view in SP Designer and lost "Edit in Datasheet" from the Actions bar.

Do you know how I can resolve this issue?

Thanks

Regards

Chris

sammutchris@gmail.com

# October 3, 2008 2:11 AM

Alex said:

Hi there Michael,

Thanks for your post, it's interesting and very useful to me.

Could you please send me some templates or smaple of documentation for SharePoint projects. As you its mnetioned above that "SharePoint SDLC differs from standard development".

Besides, I have done some researches on the Internet and I found plenty of templates such as RUP (www.ts.mah.se/.../index.htm) and others stuff, but I believe that they are not compatible with SharePoint projects and they do not fit together.

The list mentioned above (Those 14 points) are really comprehensive methodology to create full SharePoint project from A to Z, I will owe you for life if you could provide me templates of documents or some samples of documentations which applies those 14 points in the list above.

I truly need this help from you because it's very urgent and so important to me and I will never ever forget this favor, I beg your understanding!

My email is: alex9spain@gmail.com

I very much look forward to hearing from you soon!

Thank you in advance.

Sincerely,

--Alex

# October 22, 2008 7:57 AM

MO said:

Superb It work ....Thanks Man

# October 23, 2008 10:15 PM

Scott Ellis said:

Great, Many of my previous students did not know this. I have taught quite a few the same thing.

If any of the readers of this informative blog would like to learn more please visit us at www.aivea.com/sharepoint-training.htm

# October 24, 2008 5:48 AM

Scott Ellis said:

Thanks for this... helped with another deployment

# November 7, 2008 3:01 AM

jc said:

Great Article.

How do you delete a Site collection that has no Database?  I've tried from stsadm and CA .. neither works.

Also, apparently stsadm -o deletesite does not delete the Database of healthy sites either.. and apparently deleting the dataabase from SQL creates problems like the one I'm having... the site shows up in CA, but has no DB.

please email me at jc_pineiro(at)yahoo(dot)com

# November 10, 2008 2:29 PM

warren said:

man mvp is good.

# November 13, 2008 7:44 AM

manyforyou.com said:

goo information ,, i downloaded some of the whitepapers ,,

thanks

Balaji

www.manyforyou.com

# November 21, 2008 3:50 AM

Peter said:

Thank you, step 6 about correctly pointing the Central Administration the new name is what I had been missing.   I appreciate the help.

# November 26, 2008 2:00 PM

Haitao said:

Hi Micheal,

I have created a subclass of CBQ web part and enable my CBQ's subclass with the ability of using custom CAML. Recently, I want to use a custom CAML which filters all the list item of created by the current user. The CAML is like

"<Eq><FieldRef Name='Author' LookupID='True' /><Value Type='User'><UserID /></Value></Eq>"

The problem is, when the page is in edit mode, the CAML works perfectly. But when I exit the edit mode, it cannot returieve any item out.

What probably is the problem? Can you give me any help?

# December 12, 2008 10:34 AM

Michael said:

Where is your root <Query> element for CAML?

# December 16, 2008 6:14 AM

Haitao said:

My root CAML element is <Where>. So, the complete CAML is: "<Where><Eq><FieldRef Name='Author' LookupID='True' /><Value Type='User'><UserID /></Value></Eq></Where>".

I used this CAML in a SPQuery object. Then I tried to get items from a custom list with this SPQuery object. The fact is that this CAML works perfectly to filter all the items created by the current user in both edit mode and normal mode. So, I guess this problem is something related to CQWP only.

I googled lots of pages and found one post saying that the caching infrastructure of the CQWP does not cache checked-out items of individual users and we disable cache in edit mode. By following his suggestion, I set the UseCache property of the CQWP to false. This way, it works :)

Now, the problem is disabling the cache of CQWP because I don't think this is the right way of doing things. Do you have any ideas on this? Is there is another way of writting the CAML so that we can work around the cache issue?

# December 24, 2008 1:50 AM

Michael said:

Nope. You need either to disable the cache or don't use checkout items.

Actually, it's not only checkout items, but items which are not published yet, are out of the CQWP results in standard mode. We had such issue before :)

I found this behavior very logical. Because checked items and not published items are private items, which are in work now, and you should not expose those data in most of cases.

So, just disable cache or revise your approach for shown data in CQWP

# December 24, 2008 5:16 AM

Michel said:

Hey that's cool didn't know that tnx for sharing!

# January 29, 2009 1:29 AM

Matthew Cosier said:

You can also change the document template for the content type after it's created by entering the advanced settings page for the content type.

M

# January 29, 2009 5:59 PM

steve said:

Michael

I have the problem you mention in your troubleshooting, but I am not doing any mirroring.  I have restored a backup of our ContentDB to a test environment and then tried to add the contentdb to my test sharepoint site using 'stsadm –o addcontentdb....'  but get the error you mention (Cannot open database "<…>" requested by the login. The login failed. Login failed for user '….'.) in the update log.

Why would this happen?  I have done this process several time and it has always worked - any help would be greatly appreciated

# January 30, 2009 10:36 AM

Michael said:

Are you sure that your called "stsadm -o preparetomove"? before detaching? missing this call gives 90% of all problems

Try to follow this blogs.technet.com/.../detaching-databases-in-moss-2007-environments.aspx guideline how to detach and re-attach db.

# January 30, 2009 3:44 PM

Sahil Malik said:

I LOVE THIS TIP!

# February 2, 2009 12:30 PM

Chad said:

So when you say that the solution is simple :)  I'm at my wits end with this error and still cannot get it resolved.  Any additional insight would be greatly appreciated.  Thanks.

# February 9, 2009 11:02 AM

Sree said:

Hi Michael

We are having a strage issue for content deployment.

We deploy content from Authoring to QA and from QA to production.

Recently we noticed that when we deploy content from QA to production it is loosing navigaion. Means when I go to "_layouts/AreaNavigationSettings.aspx" it is not showing the navigation URL basically the last two boxes on this page are empty.

What do you think could be reason? Has anyone encountered this kind of issue?

# February 10, 2009 5:17 PM

Michael said:

Sree, check the ULS logs for "AreaNavigationSettings.aspx" file records in ContentDeployment category, if it was copied to destination server.

What could happens is that you already have this file there, or it is checked out there

# February 10, 2009 5:22 PM

khyran_herklots@hotmail.com said:

Hai,

good article of yoú; I am MOSS 2006 certified admin; little question; how can I measure the latency to different SharePoint Server Role boxes ??

Do you have a personal website with more info about MOSS 2007??

Thanx in advance.

rgds,

Khyran

# February 25, 2009 3:37 AM

Michael said:

Hello,

I just published the answer on you question. Read it there msmvps.com/.../sharepoint-tip-17-do-you-know-why-to-measure-network-latency-of-sharepoint-farm.aspx

The site about sharePoint practices is only planning. I will inform when it will be ready on my blog

# February 25, 2009 5:26 AM

Paul Grenier said:

When testing with ping, the default packet sizes are very small.  By watching typical traffic, you can shape test packets to the high, low, and average sizes.  This can help alert designers to problem areas before they appear in production.

# February 25, 2009 7:50 AM

Dhawal Mehta said:

Hi Michael,

I appreciate your valuable tips. Since long I am searching for something similar.

Is it possible for you to give some more tips on the points to take care while migrating ASP.NET custome application to SharePoint?

Thanks,

Dhawal Mehta

# March 5, 2009 3:17 AM

Michael said:

I put comment to my tips which I'm planning to publish and will find good topics for this area

# March 5, 2009 5:16 AM

Merijn van Mourik said:

Hi,

I did not succeed connecting a MOSS excel webpart to a querystringfilter webpart using this procedure.

Best regards,

Merijn

# March 6, 2009 3:54 AM

Barry Jinks said:

Great summary, Michael.

I'd love to see rows added to show how these products handle metadata, views, document templates and content types offline.

It would also be great to see some third party tools (like Colligo Contributor - admitted shameless self-promotion) added to the analysis.

Barry Jinks,

Colligo Networks.

# March 9, 2009 5:25 PM

Sam Dolan - www.pinkpetrol.com said:

Hi Michael,

I have also found that the drag and drop junctionality is broken. Although I have found this fix - neilmosafi.blogspot.com/.../sharepoint-dragging-webparts-causes.html it still does break now and again. Something that might be helpful though.

Sam Dolan

# March 20, 2009 3:17 AM

Albert Laudia said:

Hi Michael & Alex,

Do you guys have the Sharepoint SDLC documents and process that I could refer to since we are new in the SharePoint.

E: albertlaudia@gmail.com

Thanks!

-- Albert

# March 29, 2009 8:50 PM

Michael said:

There are not public templates for SharePoint SDLC, unfortunatelly. Few people tries to create them, but I can't find any good templates.

I would recommend to google:

Sample geekswithblogs.net/.../documenting-your-sharepoint-application-design-part-1.aspx and geekswithblogs.net/.../documenting-your-sharepoint-application-design-part-2-the-process.aspx

# March 29, 2009 9:01 PM

Mohamed Hachem said:

Hello

it will not show up if you have office 2003. you can get the service pack 3 for office 2003 which solves the problem partialy. you will be able to see the dataSheet in edit mode but some special columns will not appear they would only if you have access 2007 though  most of the time lists don't have those special columns "holding media stuff and pictures"

cheers

# April 2, 2009 11:00 AM

Boris Gomiunik said:

Very nice article! Thanks for the in-depth info. Is there a way to also mirror custom DLLs in GAC and custom themes?

# April 7, 2009 2:21 AM

Michael said:

custom DLLs can be easily tracked by their location in the bin folder of IIS - just move them to new server and that's all.

GAC dlls are bit tricky to find. Actually, what you can do is to inspect the web.config section for all safecontrols dlls.

Just create a new site (and activate published features) to have the clear web.config. And then compare <safecontrols> section of the clear web.config with corresponded web.config you are migrating

# April 7, 2009 3:34 AM

Nee Okai said:

Thanks Michael for the tip on AD. I am a newbie to sharepoint. I would like to ask you two questions:

1) How do you list current logon users to a sharepoint site?

2) I am planning to deploy sharepoint 2007/SQL 2005/Windows 2008 on a Hyper_V configuration:

i) SQL Server 2005 will be on separate physical server(single);

ii) Two Web Front End Servers on Hyper-V virtual machines (2G RAM) each;

iii) An index server on another virtual server (4GB RAM).

All virtual machines are running on the same physical server running windows 2008 core server (32GB intial RAM.

Will this configuration be feasible for production in a small company (400 users)?

Thanks for any help.

Nee

email: nokai@atcc.org

# April 8, 2009 10:14 AM

Michael said:

Hello,

1) you just create a new AG group, where you put your "login" users together. The point is that all fine-grained groping happen on the level of AD, not SharePoint. There is nothing bad to put user-by-users inside the SharePoint, but this might be not ideal case for the large farms.

2) "Index on another virtual server" is what I'd be very careful about. It might be ok when you don't have a lot of contend and don't optimize your DB to the specific content. But it might cause you performance issues for the large content. Take into account that index usually takes 10%-30% of you actual content and propagated to the Query servers incrementally. To understand if Index server is suitable to be on the virtual server you need to perform some testing. The good index server crawls and propagates the new part of the index in 3-30 seconds. So, just add new document to the farm, and check if you are able to find this document via SharePoint Search in 30 secs. If not - you Index server hinders from the performance issue (consider using physical HDD first and then move index role to the physical server)

# April 8, 2009 5:11 PM

fzchen said:

 I really want to know "how to get the SharePoint Farm server's version programmatically",I try to get it user sql script but I got nothing.

# April 13, 2009 3:17 AM

Michael said:

What code did you use?! SQL or API?!

# April 13, 2009 3:29 AM

Jay said:

fzchen: It sounds like you didn't select the correct database. Try the following:

Replace with your ID (do exec sp_databases to figure out the name)

use "SharePoint_AdminContent_c2150d26-7bd4-4a06-9437-fde2496ccb02";

select Version,UserName from Versions where VersionID='00000000-0000-0000-0000-000000000000' order by id desc;

# April 15, 2009 3:04 PM

Jay said:

Neat tip. How did you put color on "feature"? looks like grep --color=auto to me, I would love to have it on Windows :)

# April 15, 2009 4:42 PM

Michael said:

I just paint the "feature" keyword it in MSPaint, to highlight the info :)

# April 15, 2009 5:01 PM

Will said:

I have a specific user set to access a folder within a document library of a site.  As a result, that user was granted 'limited access' on the 'site permissions.'  When I login as that user, I can navigate almost any lists/document libraries on the site, so long as they have inherited the 'limited access' of the site permissions.  One location that I cannot access as that user is the main default.aspx page.  The site is not a published page, so it simply exists on the root of the site name.  Is there something I am missing?

# April 16, 2009 6:46 AM

Michael said:

What are the permissions for the default.aspx page?! Do you have "Restricted Access" to be set on this page for the current user?!

# April 16, 2009 5:18 PM

Jayvardhan said:

liked the blog very much.

Ping back from codeforfuture.com/.../microsoftnet-tips-and-tracks-included-interview-questions

also following you on twitter now.

Please focus more on MOSS 2007

# April 18, 2009 11:54 PM

Michael said:

This section of .NET Tips will be moved to the new hosting soon.

Stay tuned

# April 19, 2009 12:12 AM

Tee said:

Hi Micheal, I tried your code; however, I got the error when I compile it, here is the errors:

The name 'providerValues' does not exist in the current context

The name '_filterProviders' does not exist in the current context

It seems that it does not recognize these variables:

providerValues

_filterProviders

Could you tell me what need to be fixed to eliminate these errors. Thanks for your help, here is my code:

[skipped]

# April 21, 2009 12:21 AM

Michael said:

I posted the code-snippet, what means that you need to write the additional code.

1) _filterProviders - please read a commends for the  line 8. It says how to declare that variable

2) providerValues  - check what filterProvider.ParameterValues returs, and create such field

# April 21, 2009 12:33 AM

Dzeee said:

Interesting post on how to find the versions of SharePoint installed in the farm.

home.dzeee.net/.../Post.aspx

# April 21, 2009 8:29 PM

makara.tan@ato.gov.au said:

Hi,

Do you have any information on how to call a

SharePoint Web Service from SQL Server CLR Function (written in VB.NET)?

What I am trying to do is:

XYZ is a SQL Server Database 2005 and ABC is a SharePoint v3.

XYZ has aID, bname and cStatus columns

ABC has owsID, owsNameOwner

On SQL Reporting 2005, I am trying to query both XYZ and ABC like:-

Select aID, bName, cStatus,

(select owsID from ABC as ABC1 where ABC1.owsID=XYZ.aID) as IDCode,

(select owsNameOwner from ABC as ABC2 where ABC2.owsID=XYZ.aID) as NameOwner

from XZY

My SQL Report will look like this:

aID    bName    Cstatus      IDCode    NameOwner      

1      aaaa     Failed       1         John B

2      bbbb     Successful   2         Mary V

.

..

...

Thanks.

Regards,

Mak

# May 18, 2009 2:01 AM

Andrew said:

Hi Michael, can you tell me the limitations of this fix?

# May 18, 2009 7:25 AM

Tony said:

This also existed in applying Sp1 for me.

# May 19, 2009 3:12 AM

Michael said:

Not sure if there are any limitations. Just intallation trick

# May 20, 2009 6:53 AM

Mala said:

Hi,

I converted a List view to an XSLT data view in SP Designer and lost "Edit in Datasheet" from the Actions bar.

Do you know how I can resolve this issue?

# May 20, 2009 12:15 PM

Michael said:

It's behavior by design - you can't edit converted to XSLT data view in datasheet

# May 21, 2009 9:07 PM

Abdul QAdir said:

well done sir.hand soft to you

# June 6, 2009 9:58 AM

Jauchter said:

I am running into a similar problem. - My share point site works internally buy no external. After checking all settings I made this registry entry and I am able to authenticate locally on the machine but still unable to get the site to pull up authentication on the outside.  Granted there could be other reasons for this but I have gone over the settings a dozen times. Would this reqistry entry effect the ability for users on the outside to connect to the share point site?

# June 11, 2009 7:34 AM

Michael said:

Who are the "externals" and how are they logging in?!

Did you extend you web app or you are in the same network?

# June 11, 2009 7:47 AM

Robert Bogue said:

The API was is the way that this should be done...  STAY OUT OF THE DATABASES

Also, this isn't the template - it's the site definition.

# June 14, 2009 8:25 AM

Michael said:

Yep, right, the site definition from which the site template that was used to create the site is derived!

Thanks for noticing.

Btw, you might not have PowerShell installed to get site definition via API.

Database is the way to peek on that value

# June 14, 2009 8:43 AM

Joshua said:

There is another since SP2. Using stsadm -o enumallwebs. This will show the site definition and can be a great one to check all sites.

Good work on the tops by the way.

# June 14, 2009 4:21 PM

E. Shupps said:

Michael,

First, you really need to do more research before posting this kind of information.  Microsoft explicitly states that reading directly from the database is unsupported.  The recognized best practice, as Rob stated in the first comment, is to STAY OUT OF THE DATABASE.  People are going to assume that your advice is valid because you don't include any sort of disclaimer, as in "if you absolutely have no other option you can do this but you should be aware that it is unsupported, could potentially damage your SharePoint installation, and could lead to a lack of support from Microsoft" or something to that effect.  This advice is dangerous, to say the least; please be more responsible in the future.

# June 15, 2009 10:28 PM

mojgan behravan said:

it was nice topic..thank you so much

# June 17, 2009 12:21 AM

vish said:

I could able to access the user account.

using pplPicker.Acounts[0] giving me domain\userid.

How can I access userEmailid, address etc details of an account.

thanks in advance.

vish

# June 20, 2009 1:09 PM

Michael said:

Did you use PickerEntity.EntityData property?!

Email should be there.

See these samples

1) mysharepointblog.com/.../How-to-use-the-PeoplePicker-in-SharePoint.aspx

2) social.technet.microsoft.com/.../1b828093-1e5e-42f7-b9d2-10c62df498a6

# June 20, 2009 7:44 PM

sudha said:

i want to display the items in CQWP based on logged in user region.

ex:

if logged in user belongs to Middel East, i want to display Middle East related news articals to the user.

user profile property holds the user Region and news artical has the field named as region.

i want to map these and display the related news articles.

Please help me out. thanks in advance.

# June 21, 2009 7:07 AM

Michael said:

What are the requirements to the "region" detection?

Do you want to detect it by IP - where user physically locates (but what to do in case of working over proxy or being in business trip),

or you want to detect the region based on the user's localizations settings?

See these links

1) www.west-wind.com/.../334.aspx

2) forums.asp.net/.../1052219.aspx

# June 21, 2009 7:37 AM

sudha said:

Our company employees located in Geographical areas(USA,UK,INDIA).

User profiles are dumped from AD to sharepoint.

that has a property named as Region holds the User Region. Ex:  USA,UK,INDIA

I have news Document libray containing news articles and has one field named region, which indicated this artical related to that perticular region.

Ex:  USA,UK,INDIA

i want to display the news articals based on loggedIN user region by pulling the region from user profile and map it with the field region of news artical located at news document librey.

i want to customize the CQWP. plese help me out.

# June 21, 2009 7:57 AM

sudha said:

Michael, i am really waiting for your answer. please help me out.

thanks..

# June 21, 2009 10:28 AM

Michael said:

Where exactly you stuck?

You just read the user's properties from AD and then construct you CAML query to include that country.

See this sample www.helloitsliam.com/.../moss2007-–-redirect-using-profile-property-and-sharepoint-list.aspx

# June 21, 2009 10:39 AM

sudha said:

First time i am working on CQWP customization.

One more question i have,

How to expose the new properties like grouping and sorting.. how to use the newly exposed property in CAML query..

Not able to open this link, please send the full URL.

# June 21, 2009 11:15 AM

sudha said:

please suggest me the approch that suits to my requirement. can you please send the sample code.

# June 21, 2009 11:22 AM

Michael said:

# June 21, 2009 4:34 PM

Matto said:

i want to copy an agroup from one site to another but this group have limited access so an exception arise while running my application.

do you have any idea to copy this group with this limited access or any other idea will support me?

# June 24, 2009 5:33 AM

Michael said:

Matto:

answer was published on our "SharePoint Tips and Tricks Site" as a part of Q&A section sharepoint.devs-sandbox.com/index.php

You answer is #8

# June 24, 2009 8:08 AM

Matto said:

thank you sir for replay,

but these technique doesnot solve my problem, plz, let me display my problem with more details.

now, i want to copy groups only with thier permission leve from on site at a web application to another site at a different web application.

while running my own application to do that an error arise that report that " you cannot add users to limited access permission leve." this because there are groups have limited access permission.

thank you for your pateient with me, can you help me sir?or if  you have another idea plz support me with it.

# June 24, 2009 11:07 AM

Michael said:

What do you use to copy groups + permissions?

# June 24, 2009 4:28 PM

Andy said:

guide me please into ways to connect sharepoint and an older application (BarScan)written in Visual foxpro

# June 24, 2009 6:59 PM

Michael said:

Do you use MOSS of WSS?

How do you want connect FoxPro? to the list?

See this office.microsoft.com/.../HP100931601033.aspx or alternatevely use BDC

# June 25, 2009 9:11 AM

Carsten Keutmann said:

I find SharePoint Analyzer slow to operate, where SharePoint Manager 2007 is fast. And I'm not saying this just because I made SharePoint Manager 2007. Just try it out yourself.

# June 25, 2009 11:15 AM

Michael said:

Do you know the specific scenarios when it fast or slow or it's generally slow?

# June 25, 2009 4:37 PM

Matto said:

thank you for your replay sir,

sir, my problem is afetr migrating sps2003 to moss2007 i found that groups that we use when we create new users is incomplete so i try to update and complete this groups with correct permissions.

so i develop an application that read site group of a web application that have complete group and copy this group with it's permission to web application that have in complete group but some error arise report that you can not  " you cannot add users to limited access permission leve." this because there are groups have limited access permission.

thank you for your pateient with me, can you help me sir?or if  you have another idea plz support me with it.

# June 28, 2009 12:15 PM

Matto said:

sir, do you have any solution for my problem.

thanks&regards

# July 2, 2009 3:17 AM

Michael said:

why youк groups are incompleted after migration?!

Did you use STSADM -o export/import with -includesecurity parameter?!

did you consider creating security groups from scratch for your new site?

# July 3, 2009 1:47 AM

Daniel Brown said:

Once again, the installation of Office Applications is NOT required for any functionality on the server with SharePoint.

This was covered in the SharePoint magazine article which was meant to be a draft, but here is an article stating exactly the same.

Installing office on a Server is not supported or recommended nor is it needed in any shape or form on the server!

# July 3, 2009 9:06 PM

Michael said:

Thanks for this note. Updated this post

Is it because my publication was based on several blog posts and I forgot to update my post when found that error (post is dated Sep 2008, and error was found in March 2009 only)

# July 3, 2009 9:08 PM