Skip to content

Disabling mobile view in SharePoint 2010

Out of the box, SharePoint will redirect your mobile users to the mobile version of the site, which is boring and doesn’t contain web parts. It is basically a list of lists, libraries and sites which have been configured for mobile access.

To disable SharePoint from redirecting users to the mobile version, there is a hidden feature you can disable using PowerShell. It’s quite simple, and is below.

disable-spfeature -identity MobilityRedirect -url http://addressofsite

The mobile site remains available at http://addressofsite/m, but your mobile users will have the same full experience (less browser limitations) as your desktop users.

Grant and Revoke Access to Mailboxes – Office 365

One client that I work with has the new SharePoint online. For a specific project, I had to create more than one hundred users and all of them didn’t want to use their exchange account, so I had to come up with a solution. I’ve created a script to redirect their emails to their personal accounts.
Below I will demonstrate how to:

add-MailboxPermission -Identity -User admin -AccessRights fullaccess
new-inboxrule -name “Redirect to personal hotmail” -mailbox -redirectto
remove-MailboxPermission -Identity -User admin -AccessRights fullaccess

Read more…

Task failed because “sgen.exe” was not found, or the .NET Framework SDK v2.0 is not installed

After adding in the web services reference i am face with the error Task failed because “sgen.exe” was not found: solution. The issue is when Visual Studio 2008 tries to compile the site in the release mode it looks for sgen.exe fileto generate a serialization assembly and if this file is not available in C:\WINDOWS\Microsoft.NET\Framework\v3.5\ then it will fails to compile.

Solution 1:

Copy the sgen.exe file from  C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ toC:\WINDOWS\Microsoft.NET\Framework\v3.5\. This should solve your problem.

If solution 1 does not as you may not have sgen.exe file on your computer then you can try Solution 2.

Solution 2:

In Visual Studio open the project setting property then select the Build tab on the left hand side. Select the All Configurations from the Configuration drop down list. Then go down to the near the end of the panel and select Off from the drop down Generate Serialization assembly.

deployment or retraction is already under way for the solution “*.wsp”, and only one deployment or retraction at a time is supported

I faced this issue when I try to deploy a solution and it failed. I then started the service and redeploy the solution; however I face the above issue. To fix it, you need to cancel the current deployment then redeploy the solution.

Solution for SP 2007

To fix it, you need to cancel the current solution deployment. Go to Central administration -> Operations -> Solution Management and then cancel the deployment. Next, you can redeployment your solution.

Solution for SP 2010

To fix it, you need to cancel the current solution deployment. Go to Central Administration -> System Settings -> Manage farm solutions and then cancel the deployment. Next, you can redeployment your solution.

An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Failed to call GetTypes on assembly Microsoft.Office.Server.Search….

An exception of type Microsoft.SharePoint.Upgrade.SPUpgradeException was thrown. Additional exception information: Failed to call GetTypes on assembly Microsoft.Office.Server.Search, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Could not load file or assembly ‘System.Web.DataVisualization, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.
You will get this error, when you are trying to use SharePoint product configuration wizard. The reason behind the error is, you might not installed the “Chart Control” in your machine.
So, download the chart control from and install it.

SharePoint Field Types for Elements.xml

Single Line of Text:
field id=”{FDDC4E38-25E0-4FD9-92E7-D17F34A5AB12}” description=”My Content ID of Item” staticname=”ContentID” name=”ContentID” displayname=”ContentID” type=”Text” group=”Sample Site Columns” sourceid=”″

Field ID=”{13b3652a-d543-465d-91cb-a9d625637855}” StaticName=”Read_Times” Name =”Read_Times” DisplayName =”Read_Times” Description=”Read Time count of Item” Type=”Number” Group =”Sample Site Columns” SourceID =”″

Date Time:
Field ID=”{d076e4d5-c785-4c04-8b56-c1f021721749}” StaticName=”CreateDate” Name=”CreateDate” DisplayName=”Create_Date” Description=”Create Date of Item” Group=”Sample Site Columns” Type=”DateTime” Format=”DateOnly” SourceID=””

Multiple lines of text:
Field ID=”{2ae59f08-0fb0-4a9c-8a31-a180161b1029}” StaticName=”PublisherDescription” Name=”PublisherDescription” Description=”Publisher Description of Item” DisplayName=”Publisher_Description” Type=”Note” RichText=”FALSE” NumLines=”6″ Group=”Sample Site Columns” SourceID=””

Rich Text HTML:
Field ID=”{13cd0291-df15-4278-9894-630913e4d2b9}” StaticName=”AccrediterDescription” Name=”AccrediterDescription” DisplayName=”Accrediter_Description” Description=”Accrediter Description of Item” Type=”Note” NumLines=”6″ RichText=”TRUE” RichTextMode=”FullHtml” Group=”Sample Site Columns” SourceID=””

Publishing HTML:
Field ID=”{E2CC0231-FA6C-4F90-839C-118C304DFCF1}” StaticName=”PMediaDescription” Name=”PMediaDescription” DisplayName=”MediaDescription” Type=”HTML” RichText=”TRUE” RichTextMode=”ThemeHtml” Group=”Site Columns” SourceID=”″ UnlimitedLengthInDocumentLibrary =”TRUE”

Publishing Image:
field id=”{148e8191-afe7-4422-b1d1-7202eda667f1}” description=”Image 1 link of Item” staticname=”PImageID1″ name=”PImageID1″ displayname=”Image_ID1″ type=”Image” group=”My Site Columns” sourceid=”″ richtext=”TRUE” richtextmode=”ThemeHtml”>

HyperLink & Image:
Field ID=”{635a2031-2088-4413-b54e-d2af5daf08bf}” StaticName=”ImageAuthor” Name=”ImageAuthor” DisplayName=”Image_Author” Description=”Author Image” Type=”URL” Format=”Image” Group=”Sample Site Columns” SourceID=””

YES/No Boolean:
<Field ID=”{11018312-58f9-4eb0-867d-71298f82d98d}” Name=”isActive” StaticName=”isActive” DisplayName=”isActive” Description=”Select if Item is Active” Group=”Sample Site Columns” SourceID=”; Type=”Boolean”&gt;

<Field ID=”{67f8faa4-e3ee-44bf-a3b4-6e7fc9c6b9fe}” Name=”Market” StaticName=”Market” DisplayName=”Market” Description=”Market of the Country” Group=”Sample Site Columns” SourceID=”; Type=”Choice”&gt;

<Field Type=”MultiChoice” DisplayName=”Labels_Selected” FillInChoice=”FALSE” Group=”Sample Site Columns” ID=”{2fdf0ba7-0052-4e9f-80f6-e7669ac4ae4f}” SourceID=”; StaticName=”LabelsSelected” Name=”LabelsSelected”&gt;

Lookup Columns:
Field Type=”Lookup” ID=”{FE45AC76-C0E2-46C8-A047-E8C43C10315C}” Name=”LU_Country” StaticName=”LU_Country” DisplayName=”LU_Country” Required=”FALSE” List=”Lists/Region Country Master” ShowField=”RollOutCountry” UnlimitedLengthInDocumentLibrary=”FALSE” SourceID=”; Group=”Sample Site Columns”

Multi Lookup Columns:
Field Type=”LookupMulti” Mult=”TRUE” ID=”{85062ACF-315B-460A-B756-2230A5FE082F}” Name=”LU_Language” StaticName=”LU_Language” DisplayName=”LU_Language” Required=”FALSE” List=”Lists/Language Master” ShowField=”Title” UnlimitedLengthInDocumentLibrary=”FALSE” SourceID=”; Group=”Sample Site Columns”

Lookup with Additional Field Lookup column:
Field Type=”Lookup” ID=”{9AA2985D-AA17-4EA2-9556-9B0E112A64F6}” Name=”LU_ApplicationType” StaticName=”LU_ApplicationType” DisplayName=”LU_ApplicationType” Required=”FALSE” List=”Lists/Application Type” ShowField=”ApplicationType” UnlimitedLengthInDocumentLibrary=”FALSE” SourceID=”; Group=”Sample Site Columns”

Field Type=”Lookup” ID=”{668D51C4-804D-43E7-8211-950AE3BCD9A3}” Name=”LU_ApplicationType_ID” StaticName=”LU_ApplicationType_ID” DisplayName=”LU_ApplicationType_ID” List=”Lists/Application Type” ShowField=”ApplicationTypeID” FieldRef=”9AA2985D-AA17-4EA2-9556-9B0E112A64F6″ ReadOnly=”TRUE” UnlimitedLengthInDocumentLibrary=”FALSE” SourceID=”; Group=”Sample Site Columns”

User column
<Field ID=”{080FF274-4FAB-43c9-9710-78F3A76925DC}” Type=”User”DisplayName=”My User” StaticName=”MyUser” Name=”User” Required=”TRUE” UserSelectionMode=”PeopleOnly” ShowField=”Name” ></Field>