You are currently browsing the category archive for the ‘SharePoint’ category.

Now with SharePoint and Dynamics CRM running on the same dev box, attaching to a Process ID can become a challenge in identifying which one is what.

Luckily, IIS comes to the rescue. In a command prompt, run appcmd with the list command to list all the worker processes and the associated application pools. The command looks like so:

appcmd list wp

you need to have the PATH mapped to C:\Windows\System32\inetsrv

Now you don’t have to attach the VS debugged to all w3wp processes, just pick the one you want to debug against.

Enjoy!

Advertisements

At the Central Administration Level (across the farm)

Open up Central Administration > Application Management

Under “Service Applications” click on Manage service applications

clip_image002

Click on Search Service Application

clip_image004

Under Queries and Results on the Quick navigation click on Scopes

From here on instructions are identical to the steps performed at the Site collection Level.

At the Site Collection Level

Site Actions > Site Settings

Under “Site Collection Administration”, click on Search Scopes

clip_image006

Here you can create new scopes, and edit the custom scopes. Once a scope is created, you have to add rules for crawling.

clip_image008

Pay close attention to how you can structure include/exclude settings to capture only a certain section of a network share:

clip_image010

Enjoy!

This is something simple, but I’ve been asked several times about it already, so I’m going to post instructions here on how to achieve this.

Requirement: Store documents and links to documents in the same library

Implementation:

1. Create a Document Library within your site

2. In Library Settings > Advanced Settings enable management of content types

3. Add content type from existing site content types

4. Select and add Link to a Document as a new second content type

image

5. Start adding content using both content types:

image

Now you can store in the same document library both Documents and Links to external documents.

Hope this helps, enjoy!

So you’ve set-up your account to be a farm admin, and you’re trying to deploy your solution. But you get the message above.

That is because, even though you are a farm admin, your account does not have the proper permissions to the SQL database.

Check that first. Keep in mind, in 2007 certain update could cause this behavior, in which case just restart the DB service.

Messages:

  • The farm is unavailable
  • Object reference not set to an instance of an object.

The following permissions are required to allow you to deploy a solution:

  • Farm Administrator (Central Admin)
  • db_owner and db_securityadmin on the config database
  • Local admin on the servers

Are you lazy like me, and hate walking through thousands of lines of error messages logged in by ULS?

Well, now with PowerShell, life is about to get so much easier. Welcome to Get-SPLogEvent.

How to use:

Get-SPLogEvent | ?{$_.Correlation –eq “Your-correlation-id-GUID”} | ft Timestamp, Category, Message –Autosize

What you get is the category and message related to the specified correlation id.

This saved me quite a few hours of debugging on one of my last projects, otherwise it wouldn’t have caught my attention like so.

Enjoy Smile

As you’ve probably seen by now, once you create multiple site collections in the same web application, you don’t get a lot of options as far as database location. Well, it’s really not that complicated:

  • Create the databases for the new site collections (easy enough in CA)
  • Run the following PowerShell command for each site collection, or put it in a script if you feel like it:

Move-SPSite <YourSiteURL> –DestinationDatabase <ContentDBName>

That’s it, easy as pie. See more information on TechNet:

http://technet.microsoft.com/en-us/library/cc825328.aspx

Enjoy!

Part of SharePoint 2010, a new tool was added to made life easier: the developer dashboard. By default disabled, you can enable it multiple ways:

Using STSADM:

stsadm –o setproperty –pn developer-dashboard –pv ondemand

Using PowerShell:

$level=”OnDemand”

[void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)

[void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint.Administration”)

$contentSvc=[Microsoft.SharePoint.Administration.SPWebService]::ContentService

$contentSvc.DeveloperDashboardSettings.DisplayLevel=([Enum]::Parse([Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel],$level))

$contentSvc.DeveloperDashboardSettings.Update()

Write-host(“Level:” + $contentSvc.DeveloperDashboardSettings.DisplayLevel)

Values available to be set for the developer dashboard:

  • On
  • Off
  • OnDemand

Using code:

SPWebService srv = SPWebService.ContentService;

srv.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.OnDemand;

srv.DeveloperDashboardSettings..Update();

NOTE: using SPFarm is not supported in the final release of SharePoint.

Happy debugging!

Ok, this should be common knowledge by now, but when setting your own development box for SharePoint (whether it’s 2007 or 2010), these are the changes to web.config required to show proper error messages, and none of that “friendly” end-user centric messages:

<configuration>

<SharePoint>

<SafeMode CallStack=”true” … />

</SharePoint>

<system.web>

<CustomErrors mode=”off” />

</system.web>

</configuration>

 

Other sources to look at when debugging:

  • SharePoint event log
  • SharePoint logs
  • Debug the working process
  • IIS logs
  • Use tracing
  • Use remote debugging if no debugger is installed (not usually applicable to your development box)

This is not something I do every day, and I keep forgetting how to do it, so I’m posting this as a self-reminder.

On a Publishing site (collection), if I need to add sub-sites based on the Team Site template:

Go to Site Settings > Look and Feel > Page Layouts and Site Templates

Add from there the Team Site or any other site template to be used

Go and create a new sub-site based on the template just added.

Enjoy!

Because I’ve been asked so many times what’s the difference between the versions, and what’s included at what level, here’s the official list of features by version:

http://sharepoint.microsoft.com/en-us/buy/Pages/Editions-Comparison.aspx

Also, a good list, same thing but different layout:

http://thecommunicator.co.cc/2010/05/03/sharepoint-2010-feature-comparison-sharepoint-foundation-2010-vs-sharepoint-2010-standardenterprise/

Enjoy!

Microsoft Business Solutions MVP

Reviewed Book

Implementing Microsoft Dynamics 365 for Finance and Operations

Implementing Microsoft Dynamics 365 for Finance and Operations

Reviewed Book

Microsoft Dynamics 365 Extensions Cookbook

Microsoft Dynamics 365 Extensions Cookbook

Check out my Book

Microsoft Dynamics CRM 2016 Customization - Second Edition

Microsoft Dynamics CRM 2016 Customization - Second Edition

Check out my Book

Microsoft Dynamics CRM Customization Essentials

Microsoft Dynamics CRM Customization Essentials

Check out my Book

Microsoft Dynamics CRM 2011 Scripting Cookbook

Microsoft Dynamics CRM 2011 Scripting Cookbook

Reviewed Book

Microsoft Dynamics CRM 2011: Dashboards Cookbook

Microsoft Dynamics CRM 2011: Dashboards Cookbook

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 453 other followers

Follow TheCRMwiz on WordPress.com