Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Sunday, February 01, 2015

Deleting Service Application Pools in SharePoint 2010

Recently while deleting a service application my system got unresponsive and while trying to create the service application again i constantly got the following error.

“An unhandled exception occurred in the user interface.Exception Information: An object of the type Microsoft.SharePoint.Administration.SPIisWebServiceApplicationPool named "SearchServiceApplication" already exists under the parent Microsoft.SharePoint.Administration.SPIisWebServiceSettings named "SharePoint Web Services". Rename your object or delete the existing object.”

This seems to be happening because one of the service application pools were not removed while deleting the service application. This can be removed by using PowerShell.

First load the SharePoint 2010 Management Shell by navigating to Start –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell.

SPStartMenu

Then use the “Get-SPServiceApplicationPool” command to view all the existing service application pools.

Get-SPServiceApplicationPool

Now use the “Remove-SPServiceApplicationPool -Identity SearchServiceApplicationPoolName” command to remove the service application you want removed. If the service application pool’s name is having spaces remember to use double quotes.

Remove-SPServiceApplicationPool -Identity SearchServiceApplicationPool1

PowerShell will ask to confirm the deletion, after confirming the action, it will remove the service application pool.

Thursday, July 28, 2011

Comparing Content Management Systems

Recently I needed to compare the features of different Content Management Systems (CMS) and came up to the following site which has a huge list of Systems with the ability to compare their features.

http://www.cmsmatrix.org/

Sunday, April 03, 2011

Tuesday, November 02, 2010

Sorting SharePoint Folder Contents

Recently I needed to sort the contents of a SharePoint folder, in which I used IComparer to get my task done. Following is the code I used. Hope it is helpful.

As you see below I am using the TimeCreated property of SPFile object to do the comparison, other than this you can use any other property of the SPFile object. For a list of available properties refer MSDN.





  1. // Comparer Class.
  2. public class SPFilesComparer : IComparer
  3. {
  4.     #region IComparer Members
  5.     public int Compare(object object1, object object2)
  6.     {
  7.         return new CaseInsensitiveComparer().Compare(((SPFile)object1).TimeCreated, ((SPFile)object2).TimeCreated);
  8.     }
  9.     #endregion
  10. }








  1. ArrayList fileList = new ArrayList(attachFiles);
  2. IComparer compFiles = new SPFilesComparer();
  3. // Do the sorting based on the SPFilesComparer.
  4. fileList.Sort(compFiles);
  5. foreach (SPFile attachFile in fileList)
  6. {
  7.     // Use the sorted list.
  8. }




Monday, August 09, 2010

Comparing SharePoint 2010 vs 2007

It is some time since the SharePoint 2010 is released and now is a good time for you to migrate to the new improved version of it. When searching the net I found some good sites which compares the 2 versions.

Read through the following sites if you are interested.

http://www.rharbridge.com/?page_id=103

http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=4

Friday, March 26, 2010

SharePoint Page Types

Do you know in SharePoint there are two types of pages?

In a SharePoint site each page you see is either a ghosted page or an unghosted page.

Ghosted (Uncustomized) Pages

These are the pages stored in the severs file system but not in the database. The other important thing is these files are common to all the site collections within the SharePoint server and are generally based on the "out of the box" site definition templates. Basically they are working as template files. Ghosted pages are faster since ASP.NET parser will be used to parse them and as you might know ASP.NET parser will compile the page into an assembly on the first time it is rendered, on subsequent executions the compilation is skipped since the assembly is already there.

When ghosted pages are modified by SharePoint designer then they will become unghosted pages, and then SharePoint will start using that file in the future not the file stored in the file system. A common example for this would be the “default.master” file on the “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\Global“.

Unghosted (Customized) Pages

These are the pages which are stored on the database. Unghosted pages are specific to the SharePoint web site the page is in. If you change these files it will not affect any other site in the same SharePoint server. Unghosted pages will be parsed by the safemode parser which will not compile the pages. The only dynamic code allowed is server-side controls that are marked safe (Safe Controls, Trusted Controls).

Why Ghosting?

This allows SharePoint to,

  • Increase it’s performance by enabling caching the main site template into memory and then apply the changes that are stored in the database for the specific file.
  • Increases security by not allowing unghosted pages to run code so an attacker who injects code will not be able to crash your server.

Wednesday, February 17, 2010

An error shown when you try to start the SharePoint Search service

After installing the SharePoint Server when you try to start the search service you might end up with the following error.

An unhandled exception occurred in the user interface.Exception Information: OSearch (Administrator)

or

An unhandled exception occurred in the user interface.Exception Information: OSearch (UserName)

If this comes don’t panic, what you need to do is when providing the username provide it with the full domain name. For example Domain.Local\Administrator.

image

You can find the Microsoft knowledge base article here.

Wednesday, November 25, 2009

Installing SharePoint 2007 on Windows Server 2008 R2

At the beginning when you try to install Microsoft Office SharePoint Server (MOSS) 2007 on Windows Server 2008 R2 it will hesitate a little. So I thought to put the steps in.

Step 1 - Download the correct Setup.

You will not be able to use your normal SharePoint Setup to install MOSS on Windows 2008 R2, if you try you will see the following message appearing continuously.

image

Download the required version from the following Microsoft URLs.

Windows SharePoint Services 3.0 with SP2 (x86)
http://www.microsoft.com/downloads/details.aspx?FamilyId=EF93E453-75F1-45DF-8C6F-4565E8549C2A&displaylang=en

Windows SharePoint Services 3.0 with SP2 (x64)
http://www.microsoft.com/downloads/details.aspx?familyid=9FB41E51-CB03-4B47-B89A-396786492CBA&displaylang=en

Step 2 – Install MOSS using the setup.

Installation will not have any hiccups if you downloaded the correct version.

Step 3 – Configure MOSS.

When trying to configure MOSS and if your SQL Server is running in another machine which has Windows Server 2008 R2 then you will sometimes get an error saying the SQL Server is not present.

Mainly the reason for this would be that, in your SQL Server machine the Windows Firewall is turned on. Easiest step is to turn it off, but if you are worried about your security then read the other article I have on enabling a port in Windows Server 2008 R2.

After correcting the SQL related issue then you will be able to complete the MOSS configuration wizard successfully.

If you get into any more issues contact me, I will try to help you out as I can.

Tuesday, November 17, 2009

Improving SharePoint Look and Feel

If you are thinking whether we can improve the look and feel of the SharePoint site a perfect example is the Glu Mobile site. If you visit them at http://www.glu.com you will hardly believe that it is done by SharePoint. But the truth is it is SharePoint.
If you would like to know how they did it read the following 3 articles discussing on its design and development.
http://blogs.msdn.com/sharepoint/archive/2007/06/14/moss-has-got-game-glu-mobile-s-website-www-glu-com-how-we-did-it-part-1-of-3.aspx
http://blogs.msdn.com/sharepoint/archive/2007/06/14/moss-has-got-game-glu-mobile-s-website-www-glu-com-how-we-did-it-part-2-of-3.aspx
http://blogs.msdn.com/sharepoint/archive/2007/06/14/moss-has-got-game-glu-mobile-s-website-www-glu-com-how-we-did-it-part-3-of-3.aspx

SharePoint Mobile Development

If you need to create a mobile view for a SharePoint site you will soon realise that the default mobile site created by SharePoint will not take you anywhere.
With its plain look and limited features you will not be able to do anything with the default view, so to give some thing valuable to your customer you need to do some development on the default mobile site.
To get more information on getting this done visit Microsoft.
http://msdn.microsoft.com/en-us/library/ms464268.aspx

Enabling Mobile View in a SharePoint Site

Microsoft SharePoint Server has a facility to render the site content into mobile devices as well.
In default this feature will be turned off. To enable mobile access execute the following command.

STSADM.EXE -o activatefeature -name mobilityredirect -url http://ms-sharepoint-site01/m

This will create a site under the given URL without any fancy items. It will be a plain site with only basic HTML. Whenever a mobile browser tries to access the site it will be redirected to the new mobile site.
You will be able to access the mobile sites using the URL.
http://ms-sharepoint-site01/_layouts/mobile/default.aspx
or
http://ms-sharepoint-site01/m

Wednesday, November 11, 2009

Backup a SharePoint Site

There are two methods to take a backup of a SharePoint site.
1.) Using SharePoint Central Administration
To take a site backup follow the steps below.
a. Go to the SharePoint Central Administration site by clicking,
Start -> All Programs -> Administrative Tools -> SharePoint Central Administration
b. Click on Operations.
c. Click on Perform a backup under Backup and Restore.
d. Select the site or the farm to backup the entire SharePoint farm.
e. Click on the Continue to Backup Options button on the top of the list.
f. Select the type and the location of the backup and click Ok.

2.) Using the STSADM tool.

Even though Microsoft had provided a UI method to backup a SharePoint site the best way to get it done is by the STSADM tool. If you are unfamiliar with STSADM refer the following post http://arjunachith.blogspot.com/2009/11/stsadm.html.

You will be able to use the following command to get a backup of a site using STSADM.

STSADM.EXE -o backup -url http://MySharePoint:10000/ -filename E:\Folder_Name\SiteBackup.bkp -overwrite

o - Mentions that the backup is an operation.

url - URL for the site collection that you need to backup.

filename - Path to the backup file, even a network path such as \\Machine_Name\Folder_Name\File_Name.ext can be provided.

overwrite - Will overwrite an existing back file if found in the backup location.

Instead of giving the path in the filename you can use the directory parameter to mention the location as well it is shown below.

STSADM.EXE -o backup -url http://MySharePoint:10000/ -directory E:\Folder_Name -filename SiteBackup.bkp -overwrite

directory - Location for the backup, even a network path such as \\Machine_Name\Folder_Name can be provided.

filename -The name of the backup file.

The status will be shown in the command prompt.

If you would like to know the full set of available parameters for the backup operation visit the Microsoft at http://technet.microsoft.com/en-us/library/cc263441.aspx.

Wednesday, November 04, 2009

STSADM

STSADM is a command line tool which we can use to perform administrative tasks on SharePoint Server, this is very powerful since it provides features that are not available in the Central Administration site.
You will be able to find this executable at,
%COMMONPROGRAMFILES%\microsoft shared\web server extensions\12\
For example - C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN


To learn more visit the following TechNet link.
http://technet.microsoft.com/en-us/library/cc261956.aspx
Following link will have the list of operations and properties.
http://technet.microsoft.com/en-us/library/cc263384.aspx

Sunday, September 06, 2009

SharePoint Content Placeholders

I found the following image describing the content placeholders in Windows SharePoint Services (WSS) 3.0 master page.
I think I got this from Microsoft. Thanks Microsoft.

Hope it helps to you.

Saturday, May 30, 2009

Enabling Office SharePoint Server Publishing Feature

To enable publishing features you need to enable publishing in your SharePoint site.
Go to "Site Settings" by using the "Site Actions" button.
Click the "Site Features" link in the "Site Administration" category.
Clicking the Activate button of Office SharePoint Server Publishing to enable publishing.
  • Some of you might get a message saying publishing is not enabled since Office SharePoint Server Publishing Infrastructure is not active.
This is because publishing is not enabled from the site collection level, what you need to do is select "Site collection features" from the "Site Collection Administration" category and activate the Office SharePoint Server Publishing Infrastructure feature for the entire site collection. Then you will be able to activate publishing by going to "Site features".

Changing the Default Welcome Page of a Site

Do you know that we can change the default page of a site in SharePoint?

This is done by going to "Site Settings" and accessing the "Welcome page" option under "Look and Feel" category.
  • If you cannot find a link named "Welcome page" that means you don't have Office SharePoint Server Publishing enabled on your site. If you need more help on how to enable Office SharePoint Server Publishing please feel free to read my next post.

Now browse or type the page that you want to set as the welcome page and click Ok.

Monday, January 19, 2009

Changing Execution Timeout in SharePoint

If any of the tasks that you are performing in your site takes more time than usual and if the page is timing out then one solution that you can do is to increase the execution timeout value.
To change this value you need to edit the web.config files of SharePoint and the web site.

1. Open the SharePoint web.config file located at
Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS
(C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS)
using NotePad or Visual Studio.
2. Find the section and insert executionTimeout value there as shown below. 3. Save the site config file.4. Now you need to edit the web applications' web.config file. Normally this can be found under Drive:\Inetpub\wwwroot\wss\VirtualDirectories\VirtualDirectoryFolder(C:\Inetpub\wwwroot\wss\VirtualDirectories\82)using NotePad or Visual Studio. 5. Find the line maxRequestLength and add executionTimeout in to it as shown below. 6. Save the application config file.7. Do an IIS restart and then your change will be in effect.

Tuesday, January 13, 2009

Configuring Large File Uploading in SharePoint

As you have noted the maximum file size that is supported by SharePoint by default is 50MB. What if you want to upload larger files?
Luckily we can change this limit to support larger files by increasing the default upload size in SharePoint Central Administration.
1. Go to SharePoint Central Administration by clicking on Start -> All Programs -> Administrative Tools -> SharePoint x.x Central Administration.
2. Click on Shared Services Administration link on the administration home page. 3. Click on SharedServices1 (Administration site host) link in Manage this Farm's Shared Services page to open the Web Application General Settings page. 4. Find the Maximum Upload Size property and change it to the maximum upload file size you want. Note that you can put file sizes up to 2GB (2047MB). Now you will be able to upload larger files than 50MB.
But to support uploading large files you also may need to increase the default timeout value.
I will be posting the next post of mine on how to increase the timeout value.

Tuesday, December 30, 2008

Exception from HRESULT: 0x80040E14

Recently in SharePoint server I got an error when trying to do almost any action.
The error was Exception from HRESULT: 0x80040E14.
After sometime I did find out, that my C drive has gone out of disk space, and that caused SQL transaction log creation failure which resulted this error.
So freeing up more space on C drive solved my problem.
You will be able to get more details of the error by checking SharePoint log files.