Saturday, October 29, 2011

12 hive folder structure in sharepoint 2007

Few things about 12 hive folder structure and how well it is mapped with the wsp schema.
SharePoint 2007 have a 12 hive structure which basically contains various files and folders that make SharePoint Interface. The files under 12 hive are mostly Uncustomized, that means they stay on the file system rather than in SharePoint database and perform better while rendering the Pages.

You would normally, deploy your Custom files like Custom Pages\layouts, webparts, css or javascript files under 12 hive, so that they can well interact with SharePoint site.

12 hive in SharePoint 2007 has various folders that make up a virtual path for the resources they contain. For e.g to access a CSS file deployed under styles folder we can use a path like

The most commonly used folders are :

\ISAPI\HELP\[LCID] - SharePoint help files. Deploy your own .chm files to this folder (or a localized subfolder)

\CONFIG - Web.config customizations

\ISAPI - SharePoint web services (deploy your custom web services here); this maps to /_vti_bin.

\Resources Global .resx - Files accessed from custom features and site definitions

\TEMPLATE\CONTROLTEMPLATES - deploy .ascx user controls here; maps to /_controltemplates

\TEMPLATE\FEATURES - Features contain folder and related file for each feature.

\TEMPLATE\LAYOUTS - Common site pages; maps to /_layouts

\TEMPLATE\IMAGES - Common site image files; maps to /_layouts/images

\TEMPLATE\SiteTemplates - All SharePoint site definitions; create a \xml to deploy your onet.xml custom site definition

\TEMPLATE\THEMES - All UI elements used in themes; clone an existing theme folder to create your own

\TEMPLATE\[LCID]\XML - Webtemp.xml files to define available site definitions; add an xml file here for your custom site definition

\TEMPLATE\ADMIN Pages - Used by Central Admin; maps to /_admin

\ADMISAPI Administration web services; maps to /_vti_adm

Now lets discuss the most commonly used Folder in SharePoint development.

TEMPLATE Folder - The most commonly used folder in 12 hive is the template folder or 12\TEMPLATE\. This is where developers deploy all of there custom files like Custom css, javascript file, Image file, Usercontrol, Custom aspx page, layouts page etc. etc.. These Custom files then run under SharePoint context and can well interact with Out-of-Box sharePoint components.

SharePoint 2007 Interview Questions for Administrators

What are the differences between web part page gallery, site gallery,Virtual server galleryand online gallery?

Ans: Web Part Page Gallery is the default gallery that comes installed with SharePoint. Site Gallery isspecific to one site. Virtual Server gallery is specific to that virtual server and online gallery aredownloadable web parts from Microsoft.

Q. What is the difference between a site and a web?

Ans: A site in sharePoint is a site collection. It is an object of SPsite class in sharepoint. While a Web is simply a blank site within that site collection. Web is a Part of SPweb class, thus represents a site within a site collection.

Q. When to use Diffrent Site Collections?

Ans. An Individual Site collection offers following :

For the Users:

Dedicated Recycle bins
Dedicated usage Reports
Distributed administration (site collection administrators)
Dedicated search scopes, keywords, and best-bets
Custom feature deployments
Dedicated language translation maintenance
Dedicated galleries for web parts, master pages, content types, site columns, site templates, and list templates
Dedicated shared libraries, such as site collection images and site collection styles
Dedicated real estate (Self Containment)

For the IT Administrators:

Site quota templates
Distributed administration
Site locking
Database maintenance options
Backup / Restore abilities
Content Deployments
InfoPath forms services global template targeting

Q. why to use different site collections

1. Site quotas is one of the reasons. The issue is the recycle bin is based on site collections and the quota for a site collection. If everyone shares a site collection, then they share the recycle bins storage size.

2. Delegated Security and distributed administration is the next big thing. For eg, you have a IT department that doesn't know who should be able to see what content, besides how it should be organized. This is the job of the content owners and users. SharePoint site collections offers IT the ability to create a site collection for a project, team, department, document, or whatever the needs are, then assign an owner and hand it off to them.

3. In addition to these two points is the need to separate the content between databases.

Q. What is Authentication and Authorization.

Ans : An authentication system is how you identify yourself to the . The goal behind an authentication system is to verify that the user is actually who they say they are.

Once the system knows who the user is through authentication, authorization is how the system decides what the user can do.

Q. What are Security methods(Authentication methods) available in sharepoint 2007.

Ans : Out of the box", SharePoint 2007 supports nine authentication methods. NTLM (short for NT Lan Manager, which is simply the Windows authentication that everyone is familiar with) and Kerberos (also a Windows "standard" authentication) are offered during installation, but I recommend to get started with NTLM, as Kerberos requires "special configuration by the domain administrator", while NTLM works without further hassle.

Q. Can you name some of the tools used for SharePoint Administration?

Ans. Some of the tools Used for SharePoint Administration are

* Axceler's ControlPoint (Version : ContolPoint 3.5 )

Description : ControlPoint 3.5 helps enterprises adopt and embrace microsoft sharepoint more than ever before. ControlPoint 3.5 boasts powerful new capabilities that give enterprises more control over their configuration and deployment of SharePoint while strengthening their SharePoint security.

* DocAve (Latest Version : DocAve Software Platform v5.3)

Description : DocAve Software Platform v5.3, is considered the industry's most comprehensive software solution for SharePoint backup and recovery, administration, archiving, auditing, replication, reporting, compliance, and migration.

* Nintex Workflow(USed for Workflow )

Description : Nintex Workflow 2007 enables organizations to build complex workflow processes quickly and easily using a web browser interface. Nintex Workflow 2007 empowers users across the organization to automate business processes, review workflow activities and automate common SharePoint administrative tasks.

Q. Can a web application use few shared services like search,audience from ssp?

Ans. No, it has to use all the shared services in that SSP.

Thursday, June 16, 2011

Tip #1: Add Command Line Shortcut to "12 Hive"

When you're in a command prompt, sometimes you need to navigate to the 12 Hive directory. But no one wants to type the directory path to c:\Program Files\Common Files\Microsoft Shared\web server extensions\12. Wouldn't it be easier if you could just type the following to get there?

c:\>cd %12hive%
c:\Program Files\Common Files\Microsoft Shared\web server extensions\12

I'd sure say it is! The other thing is I almost always want to be within a Visual Studio Command Prompt to have easy access to things like SN.EXE and GACUTIL.EXE. A VS Command Prompt is nothing more than a simple batch file. I've created my own batch file that executes the VS Command Prompt batch file and sets the %12HIVE% variable to the 12 Hive directory. Here's how:

  1. Create a new file called SharePointCommandPrompt.cmd and insert the following text in it (if you're on a 64 bit system, you'll want to make the appropriate changes):

    @echo off
    echo Setting 12HIVE environment variable.
    set 12HIVE="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12"
    "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86

  2. After saving the file, create a new shortcut with the following target:

    %comspec% /k ""c:\[Path To The File You Just Created]\SharePointCommandPrompt.cmd""

  3. To put a cherry on top, drag the shortcut onto your Quick Launch toolbar... should work like a champ!

To try it out, click the shortcut and type CD %12HIVE% at the command prompt. You should change directories to the root of the 12 Hive.

For more tips you might like to visit andrewconnell blog.

Saturday, April 30, 2011

Which is Better a UserControl or Web Part for SharePoint?

Advantages of Using User Control are :
Advantages of User control
There are three primary advantages to user controls when dealing with SharePoint. They are: familiarity, reusability, and development speed.
One of the keys to development is managing the degree of change that the team is put through as it transitions from technology to technology. Part of managing that change is minimizing it where possible. This is one of the reasons that user controls are such a good solution for many organizations. User controls are a core ASP.NET construct, they are something that developers are likely already familiar with — or at least aware of. This familiarity increases the knowledge reuse coming into the project, which keeps morale high, improves productivity, and improves reuse of the experience after the SharePoint project.

Another way user controls are advantageous is that they can be used with other ASP.NET-based solutions. They aren't explicitly tied to SharePoint. If for some reason in the future you decide that SharePoint isn't the right platform for the solutions you're building — or you decide you need to reuse the technology in another non-SharePoint project — you have that capability.

*Development Speed:
Direct support by Visual Studio for a visual interface for user controls — as opposed to manually adding in controls through code — is a great advantage in development speed. Having a visual look and feel instantly available makes the process go faster.

*Debugging is faster too, as you can construct testing harnesses that fully exercise and instrument the user control. Web Parts are essentially only runable from within SharePoint. This means that you must deal with all of the SharePoint infrastructure while trying to debug.
Maintenance is also easier and faster with User Controls, primarily because they are easier to understand and debug. The net of this is that developing with user controls is substantially faster than developing a Web Part for everything but the most trivial implementations

What are Application Pages in SharePoint?

Unlike site pages (for example, default.aspx), a custom application page is deployed once per Web server and cannot be customized on a site-by-site basis. Application pages are based in the virtual _layouts directory. In addition, they are compiled into a single assembly DLL.

A good example of an Application Page is the default Site Settings page: every site has one, and it's not customizable on a per site basis (although the contents can be different for sites).

With application pages, you can also add in line code