Posts

Showing posts from September, 2010

Include Javascript and CSS Compression in Visual Studio

Image
For a frontend developer it is a must to compress his javascript and css files, before deploying a website to a productive environment. In this post I'll demonstrate how you can automate this process in Visual Studio. First of all download the YUI Compressor for .Net . (3.5) Extract the zip file and copy the to files into a folder in your visual studio solution. I have a folder called "Libraries" for third part dll files. YUI Dlls Create a file "MSBuildCompress.xml" in a folder you want. I put this file in my "_Tools" folder. Custom Compress Msbuild Task Put the following xml in your newly created xml file. <?xml version="1.0" encoding="utf-8"?> <!-- Author Baris Bikmaz --> <!-- MSBUILD Task to compress css and js files with the yui compressor --> <Project xmlns="http://schemas.microsoft.com/developer/MsBuild/2003">     <UsingTask         TaskName="CompressorTask

Get User Email in MatchPoint

Image
If you want to show the user name with a email link in MatchPoint, you can use the SPHelper.GetUser() method. In a DocLib you can use the fields "Editor" or "Modified_by". In the following example I have a ListDataProvider with a XslTransformer. The first thing we have to do is a mapping. Mapping of the DataItem If the field you want to show (Editor) is of type SPUserField you should cast it to String with ToString() or DisplayString. Now you can you the mapping in the XSLT. XSLT

SharePoint and reverse proxy

Yesterday I had to deploy a new SharePoint Solution to one of our customers. We had tested the Solution on our local machines and on the staging server. Everything was fine. After we installed the solution on their integration and quality server we realized that some WebParts threw an exception: " System.ArgumentException: Value does not fall within the expected range.     at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)     at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)     at Microsoft.SharePoint.SPWeb.GetMetadataForUrl(String relUrl, Int32 mondoProcHint, Guid& listId, Int32& itemId, Int32& typeOfObject, Object& fileOrFolder)     at Microsoft.SharePoint.SPWeb            fce4

How to setup a Mysite in SharePoint 2010

Image
In this post I'll show you how to create and setup a mysite in SharePoint 2010. I will create a new webapplication for the mysite but you can also use an existing webapplication. Ensure yourself that the "User Profile Service" is running. The MySite needs this service to function. You can check the blog post " Configuring the User Profile Service " for more information. User Profile Service First of all if you want to host your mysite on a new webapplication create a new webapplication. Therefore go to the Central Administration -> Application Management -> Manage Web Applications . Here click on "New" in the ribbon above and create a new webapplication which will host the mysite. Create a new webapplication Properties of the mysite webapplication Now you have to configure a managed path, where all personal sites will be created. Normally we use "personal" as managed path.To create a managed path  go to Central Admi

Configuring the User Profile Synchronization Service in SharePoint 2010 - Step by Step

Image
Yesterday I had the problem that my "User Profile Synchronization Service" (UPS) did not started. So I took a look over the Guidance provided by Microsoft. This really helped me but I also realized that this can be frustrating for someone who doesn't know how to setup this service. If you want a successful setup it is important that you follow exactly this provides guidance step by step. This blog post builds up on this guidance. First of all yo u must be a farm account to do all this configration and SharePoint is not a stand-alone installation ( See msdn ). I had also problems with FQDNs when I installed SharePoint. Don't use FQNs like sp2010.domserver.com when you setup SharePoint. Lastly there is a bug in the creation of the Sync DB which will prevent the UPS provisioning from succeeding. Before we start UPS we must fix this up. ( see Powershell bug ) ! (Update October 2010)    DO NOT INSTALL THE OCTOBER 2010 CUMULATIVE UPDATE for SharePoint Server or Pr