Sunday, 16 December 2012

What happens behind the scene when we create new Web Application in SharePoint ?


When we create a new Web Application in SharePoint, following are various actions which happens behind the scene:

1 - Creates a unique entry in SharePoint configuration DB for the Web Application and assign GUID to
that entry.
2 - Create and configures a new site in IIS
3 - Creates and configures a new IIS application pool.
4 - Configures authentication protocol and encryption settings.
5 - Assign a Default alternate access mapping for the Web Application.
6 - Creates the first content database for the Web Application.
7 - Associate a search service with the Web application.
8 - Assign a name to the Web application that appears in the Web application list in SharePoint Central Administration.
9 - Assign general settings to the Web application, such as maximum file upload size and default time zone.
10 - Updates the web.config file to make entries for custom HTTP Modules and Handlers for SharePoint.
11 - Creates virtual directories for SharePoint web services and SharePoint layouts folder.

After creating a Web Application in SharePoint, the web site is actually not created yet. It means if you try to access the Web Application using the web app url, it will show you "Page cannot be displayed" error. Basically at this point of time, a web application has been created and all the mandatory configuration has been done. Now the next step is to create a Site Collection using a particular Site Definition, then only the actual site will be created and you will be able to access the site using the url of Site Collection.

Wednesday, 12 December 2012

To remove the title column from a Sharepoint list


If you want to remove the "title" column permanently, follow the steps given below:

1. Go to the Settings->List Settings->Advanced settings.

2. Check the "yes" Radio button for "Allow management of Content types" and hit OK.

3. Setp 2 will give you "Content types" option on the settings page which will have "Item" content type.

4. Click on "Item" .

5. Clicking on the "Title" will give the screen where you can hide the column completely for future use. Click on "Hidden" under "Column settings" option in this page and hit Ok.

6. Now go back to the list and add a new item and you won't see the "Title" column.

Filter Lookup Field Values by Current User in caml query


If you want to pass current logged user into caml query, you can use this one :

<Where>
  <Eq>
    <FieldRef Name="Author" />
    <Value Type="Integer">
      <UserID />
    </Value>
  </Eq>
</Where>

Friday, 7 December 2012

Completely Remove a Feature from Site Collection

After you deploy a feature from Visual Studio to Sharepoint 2010, you can see the feature in Site Actions  -->  Site Settings --> Site Collection Features, from there you can activate or deactivate the feature.

Click on start --> Microsoft Sharepoint 2010 products --> Sharepoint 2010 Management Shell.

To Complete remove the chnage password option Type
Uninstall-SPFeature ChangePassword

Note: Each feature is available is in its own subdirectory in the path:
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES\

You need to use the actual subdirectory name (not the name shown in the Site Collection Features screen) in order to uninstall it. You need to deactivate the feature before removing it.