this blog contains information for .net and sql stuffs. You can find various tips and tricks to overcome problem you may be facing in ...

Saturday, July 30, 2011

Sharepoint Core Classes

Sharepoint is collaborative product developed by microsot, many organizations adopting this product for their business activity. There are many benefits to use and implement to it. It becomes around 10 years of this product, one can say it become matured product for business automation.

Today I am going to give you brief development core classes and it’s structure in sharepoint environment.

Basically, any sharepoint environment can have one or more SharepointFarm, SharepointFarm can have one or more WebApplication, WebApplication have one or more SiteCollection, Sitecollection have one or more SubSite.

This SubSite is called your end where most of items are manipulated and shown to users.

At the Site level we can have List, Document Library.

Furthermore List is can have or more list items and Document Library can have files and Folder.

Above all are the basic terms one should know before they start to develop or implement sharepoint in their business.

For the development in sharepoint, we should understand classes being used in each of entity I told above.

For the Sharepoint Fam SPFarm

Farm’s WebApplication SPWebApplication

WebApplication’s SiteCollection SPSite

SiteCollection’s WebSite SPWeb

WebSite’s List SPList

List Item SPListItem

WebSite’s Document Library SPDocumentLibrary

WebSite’s Folder SPFolder

WebSite’s file SPFile

NOTES: I have considered that you have development machine for sharepoint and you are going to develop in it, to access above all classes you require to have sharepoint on your machine.

Monday, July 4, 2011

Redirect old page to new page with use of web.config

Recently we found that some of our old links were broken as we have changed our page name to make it seo friendly. Suddenly, over the night our site’s page rank was down. It was really embarrassed situation for all of us.

There were below reason for it.

As we have moved our server from linux to windows platform and there were no idea of page rename, and lack of technical availability to use htaccess redirection in windows platform.

After some work around it, finally I came across following things which is very good and needs to use when we rename any page and don’t want old link should be break.

Here, please not that following things will work on IIS 7.0+

First block will resolve canonical issue of prefix www before any domain name.

Second block will redirect my old page link to new mapped page.

<rule name="Redirect to WWW" stopProcessing="true">

<match url=".*" />

<conditions>

<add input="{HTTP_HOST}" pattern="^mydomain.com$" />

</conditions>

<action type="Redirect" url="http://www.mydomain.com/{R:0}" redirectType="Permanent" />

<rule>

<rule name="redirect to new java page" stopProcessing="true">

<match url="^javadeveloper.html" />

<action type="Redirect" url="java-development-services.html" redirectType="Found" />

</rule>