Wednesday, November 02, 2011

Creating SharePoint 2010 Event Receivers in Visual Studio 2010

Creating SharePoint 2010 Event Receivers in Visual Studio 2010

Custom Content Types in SharePoint

List def - content type

Sharepoint 2010 event handler to create subsites


Creating Event receiver in SharePoint 2010


Programmatically creating Sites and Site Collections from a Custom Web Template


SharePoint Solution Package (WSP) Deployment


How To: Create custom content type and list instance in SharePoint 2010 using Visual Studio 2010


Using SharePoint Feature Receiver create Virtual Directory in IIS

SharePoint Object's Size limitation in MOSS 2007

SharePoint Object Limits
Site collections in a web application 50,000

Sites in a Site collection 250,000
Sub-sites nested under a Site 2,000
Lists on a Site 2,000
Items in a List 10,000,000
Items in View 2,000
Field Type in a list 256
Documents in a Library 2,000,000
Documents in a Folder 2,000
Maximum document file size 2 GB (by default 50MB)
Documents in an Index 50,000,000
Search Scopes 1,000
Search Scopes in a Site 200
User Profiles 5,000,000
Template size 10,000,000 (default)

**********************************************************************
Identify Worker Process (w3wp.exe) in IIS 6.0 and IIS 7.0 for Debugging in SharePoint
It is very deficult to identify perticular SharePoint web application's worker process in IIS 6.0 and 7.0 because there are somy web aplication running on SharePoint Farm.


How to attach worker process?
we can go to Tools > Attach Process or use shortcut key Ctrl +P.
Identify Worker Process in IIS 6.0

* Start > Run > Cmd
* Go To Windows > System32
* Run cscript iisapp.vbs

You will get the list of Running Worker ProcessID and the Application Pool Name in IIS 6.0.


Identify Worker Process in IIS 7.0
From IIS 7.0 you need you to run IIS Command Tool ( appcmd ) .

* Start > Run > Cmd
* Go To Windows > System32 > Inetsrv
* Run appcmd list wp

This will show you list worker process that is running on IIS 7.0 in the similar format of IIS 6.0

Happy Debugging...!!!

SPBasePermissions Enumeration



MOSS 3.0 to SharePoint 2010 Migration

1. Take a Content Database backup from MOSS 3.0 DB Server.
2. Restore it in SharePoint 2010 DB Server.
3. Add Restored Database in SP 2010 existing Web Application.
4. Remove older Content Database (which created with web application creation time)
5. Move all related files from MOSS 3.0 to SP 2010 farm. Ex. – Customization (Features, User Controls, Web Parts, Custom Application Pages, and Timer Jobs etc.), Third Party controls etc.
6. Run PreUpgradeCheck Power Shell script from SharePoint 2010 Management Shell (I will we back with new post)
7. After successfully run this command browse you site it should be working with UI Version 3.0.
8. For SharePoint 2010 look & feel you have to change UI Version 4.0 (Visual Upgrade see my new post).


Happy Migration !!!
Visual Upgrade in SharePoint 2010
There so many ways to Visual Upgrade Migrated SharePoint Site.
One of this is run power shell script from SharePoint 2010 Management Shell.

All Site Collection Upgrade under Single Web Application as below command
$webapp = Get-SPWebApplication http://UIVersion3WebApps/
foreach ($s in $webapp.sites)
{$s.VisualUpgradeWebs() }


Site Collection Upgrade including All Sub Webs as below command
$site = Get-SPSite http://UIVersion3SiteCollection/
foreach ($web in $site.AllWebs){$web.UIVersion = 4;$web.Update();}

Only Site Collection Web Upgrade without All Sub Webs as below command
$site = Get-SPSite http://UIVersion3SiteCollection/
$site.VisualUpgradeWebs()

Only Single Web Upgrade as below command
$web = Get-SPWeb http://UIVersion3SiteCollection/site
$web.UIVersion = 4;
$web.Update();


Happy Upgrading !!!

Access FBA SharePoint site using web service
You can access any site collection programmatically as below code
You have to use Authentication.asmx web service for authenticate any user.
Then you can access any lists of this site.

// /_vti_bin/Authenticate.asmx web service's Object
Authentication.Authentication objAuthentication = new Authentication.Authentication();
objAuthentication.CookieContainer = new System.Net.CookieContainer();
LoginResult loginResule = objAuthentication.Login("username", "password");

if (loginResule.ErrorCode == LoginErrorCode.NoError)
{
CookieCollection objCookieCollection = objAuthentication.CookieContainer.GetCookies(new Uri(objAuthentication.Url));
Cookie authCookie = objCookieCollection[loginResule.CookieName];

// /_vti_bin/Lists.asmx web service's Object
Lists.Lists objLists = new Lists.Lists();
objLists.CookieContainer = new CookieContainer();
objLists.CookieContainer.Add(authCookie);

System.Xml.XmlNode objListXMLNode = objLists.GetList("Shared Documents");
}


Happy Coding !!!

No comments:

Blog Archive