Click on this icon to open the XML page.Tom Van Gaever - Blog
Search:   

Description of Visual Studio 2010 Service Pack 1 - IntelliTrace for SharePoint 
Tuesday, March 15, 2011, 20:34 - SharePoint
Posted by Administrator
IntelliTrace for 64-bit and SharePoint

IntelliTrace is the revolutionary new debugging technology in Visual Studio 2010 that enables you to move forward and backward through a debug session. However, because of time constraints and because it is a completely new feature, this technology does not work in all scenarios.
http://support.microsoft.com/kb/983509

Visual Studio 2010 SP1 enables the IntelliTrace debugging technology on 64-bit solutions and for Microsoft SharePoint farm solutions.


What is IntelliTrace?
http://blogs.msdn.com/b/habibh/archive/ ... trace.aspx

Example
http://msdn.microsoft.com/en-us/library/gg599007

add comment ( 23 views )   |  permalink   |  related link   |   ( 3 / 2832 )
Correlation ID in SharePoint: Retrieve information from ULS by using a site action (Codeplex) 
Sunday, February 6, 2011, 15:11 - SharePoint
Posted by Administrator
Project Description
Enables a webpart and a ribbon button that allows you to retrieve the information recorded in the ULS log tagged with a specific correlation ID.

This makes it much easier for SharePoint developers to retrieve the log messages for a specific correlation token.

http://spcorrelationviewwp.codeplex.com/





More information regarding correlation Id's in SharePoint 2010:
http://sharepoint.microsoft.com/Blogs/G ... spx?ID=353
http://www.zimmergren.net/archive/2010/ ... -2010.aspx



add comment ( 27 views )   |  permalink   |  related link   |   ( 3 / 18251 )
SPMonitoredScope – SharePoint 2010 performance monitoring 
Sunday, January 30, 2011, 12:05 - SharePoint
Posted by Administrator
As SharePoint developers we aren’t only responsible for creating the functionality business requires, but we are also responsible for the overall quality of the solution we build. This means an ergonomic fluent user interface, code that is suitable for changes and in my opinion one of the most important aspects, a good performance. Most of these topics are described in white papers, best practices and millions of books and blog posts… but wouldn’t it be a pleasure if it was already in the platform?
Yes, indeed! That is why the SharePoint team provided us with the developer dashboard and the SPMonitoredScope class!

How to activate the developer dashboard?
There are several different ways to activate and deactivate the toolbar; it is up to your greater judgment to decide which one seems the most suitable for your situation. By default it is deactivated, so the first step would be the activation. You can do this by using STSADM, PowerShell or C#

STSADM
stsadm -o setproperty -pn developer-dashboard -pv on
stsadm -o setproperty -pn developer-dashboard -pv off
stsadm -o setproperty -pn developer-dashboard -pv OnDemand


PowerShell
Add-PSSnapin Microsoft.SharePoint.Powershell
$dash =[Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$dash.DisplayLevel = 'OnDemand';
$dash.TraceEnabled = $true;
$dash.Update() 


PowerShell function
function Set-DevDashboard ( [string] $setting ) {
    $dashboardSetting = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings
    Write-Host "Setting Developer Dashboard DisplayLevel to $setting." -ForegroundColor Gray
    switch -exact ($setting) {
        "On" { 
            $dashboardSetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
         }
         "OnDemand" {
            $dashboardSetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
         }
         "Off" {
            $dashboardSetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off
         }
         Default {
            "Valid settings are On, OnDemand, or Off."
            break
         }
    }
    $dashboardSetting.Update()
} 


How to provide custom traces in developer dashboard?

SPMonitoredScope inherits from IDisposable, so it is better to use it in combination with a using statement.
public class SPMonitoredScope : IDisposable

If you specify the onDemand setting, you receive a link button which displays a button which you can use to toggle the dashboard.

In order to demonstrate how easy it is, I created a new visual web part project and added this code in the page_load method. The code does nothing special, a single thread.sleep to simulate a long running operation and the monitoredscope class around it.
using Microsoft.SharePoint.Utilities;
protected void Page_Load(object sender, EventArgs e)
{
using (SPMonitoredScope GetListsBtnScope = new SPMonitoredScope("tomvangaever_call_1"))
{
Thread.Sleep(2000);
}
}


If we add the web part to the page and open the developer dashboard by using the new icon that appears next to your username, you can see that there is a new message in the dashboard and ULS view:

tomvangaever_call_1 (1999.67 ms)




How to provide the developer dashboard on a custom master page?
In order to provide this functionality on your own master page or custom page, you need 2 components. The first component (SharePoint:DeveloperDashboardLauncher) is the link button that allows you to enable/disable the dashboard. The second component is the dashboard (SharePoint:DeveloperDashboard)control itself.





When should I use it?
I would recommend using the SPMonitoredScope as a best practice around each major code block in your public methods. And while testing your web part you can review (and maybe improve) the performance of your code in detail.
What about sandboxed solutions?
You cannot use SPMonitoredScope in Sandboxed Solutions.

Happy SPCoding !!
add comment ( 26 views )   |  permalink   |  related link   |   ( 3 / 8131 )
Webservice Xslt Transformer WebPart for SharePoint 2010 (Extended XML Viewer Webpart) 
Monday, January 10, 2011, 19:50
Posted by Administrator
I'm happy to announce a new webpart that extends the powerfull XML Viewer webpart. This new web part is 100% available at codeplex.

It allows you to provide the URL of a web service, a SOAP Envelope, a SOAP Action and an XSLT definition.

When the webpart is added to a page, it wil automatically access the predefinied web service with the provide soap envelope. The XML that is returned by the web service is transformed by using the user definied XSLT.

This approach allows you to quickly provide show data from an external system in a no-code-solution.

Download the wsp and/or code from codeplex.com



I hope it can help you!



add comment ( 23 views )   |  permalink   |  related link   |   ( 3 / 7700 )
Special Characters (é,ç,à, ... , è) not readable in mail sent from SharePoint 
Tuesday, November 30, 2010, 08:36 - SharePoint
Posted by Administrator
Change the character set in Outgoing E-Mail Settings from the Central Administration to the appropriate setting.

MSDN:
When you configure outgoing e-mail, you will need to specify the character set to use in the body of e-mail messages. A character set is a mapping of characters to their identifying code values. The default character set for outgoing e-mail is Unicode UTF-8, which allows most combination of characters (including bidirectional text) to co-exist in a single document. In most cases, the default setting of UTF-8 works well, although East Asian languages are best rendered with their own character set.

We switched from Unicode UTF-8 to 1252 Western Europe (Windows) and it worked perfectly without changing the code of that project.

Credits to Mathias Verlee and his statement 'The problem is most likely not the code, but configuration'. ;)

1 comment ( 37 views )   |  permalink   |   ( 3 / 8678 )

<Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>