Wednesday, April 14, 2010

Microsoft SMB Protocol and CIFS Protocol

Microsoft SMB Protocol and CIFS Protocol

The Server Message Block (SMB) Protocol is a network file sharing protocol, and as implemented in Microsoft Windows is known as Microsoft SMB Protocol. The set of message packets that defines a particular version of the protocol is called a dialect. The Common Internet File System (CIFS) Protocol is a dialect of SMB. Both SMB and CIFS are also available on VMS, several versions of Unix, and other operating systems.

The technical reference to CIFS is available from Microsoft Corporation at Common Internet File System (CIFS) File Access Protocol.

Although its main purpose is file sharing, additional Microsoft SMB Protocol functionality includes the following:

Dialect negotiation
Determining other Microsoft SMB Protocol servers on the network, or network browsing
Printing over a network
File, directory, and share access authentication
File and record locking
File and directory change notification
Extended file attribute handling
Unicode support
Opportunistic locks

In the OSI networking model, Microsoft SMB Protocol is most often used as an Application layer or a Presentation layer protocol, and it relies on lower-level protocols for transport. The transport layer protocol that Microsoft SMB Protocol is most often used with is NetBIOS over TCP/IP (NBT). However, Microsoft SMB Protocol can also be used without a separate transport protocol—the Microsoft SMB Protocol/NBT combination is generally used for backward compatibility.

The Microsoft SMB Protocol is a client-server implementation and consists of a set of data packets, each containing a request sent by the client or a response sent by the server. These packets can be broadly classified as follows:

Session control packets—Establishes and discontinues a connection to shared server resources.

File access packets—Accesses and manipulates files and directories on the remote server.

General message packets—Sends data to print queues, mailslots, and named pipes, and provides data about the status of print queues.

Ref: http://msdn.microsoft.com/en-us/library/aa365233(VS.85).aspx

SharePoint Escalation Team - MOSS 2007 Search Query Mechanism Part 1

Ref: http://blogs.msdn.com/spses/archive/2010/03/02/moss-2007-search-query-mechanism-part-1.aspx

Errors when crawling content sources in SharePoint Server 2007: "Event ID 2436" and "Access is denied"

Ref: http://support.microsoft.com/kb/971382

Tuesday, April 13, 2010

SQL Recovery Model Overview (Simple vs Full Recovery)

Simple Recovery Model

--------------------------------------------------------------------------------
The simple recovery model minimizes administrative overhead for the transaction log, because the transaction log is not backed up. The simple recovery model risks significant work-loss exposure if the database is damaged. Data is recoverable only to the most recent backup of the lost data. Therefore, under the simple recovery model, the backup intervals should be short enough to prevent the loss of significant amounts of data. However, the intervals should be long enough to keep the backup overhead from affecting production work. Including differential backups in the backup strategy can help reduce the overhead.

Generally, for a user database, the simple recovery model is useful for test and development databases or for databases containing mostly read-only data, such as a data warehouse. The simple recovery model is inappropriate for production systems where loss of recent changes is unacceptable. In such cases, we recommend using the full recovery model.

For more information, see Backup Under the Simple Recovery Model.
http://msdn.microsoft.com/en-us/library/ms191164.aspx

Full Recovery and Bulk-Logged Recovery Models

--------------------------------------------------------------------------------

The full recovery and bulk-logged recovery models provide greater protection for data than the simple recovery model. These recovery models rely on backing up the transaction log to provide full recoverability and to prevent work loss in the broadest range of failure scenarios.

•Full recovery model

Provides the normal database maintenance model for databases where durability of transactions is necessary.

Log backups are required. This model fully logs all transactions and retains the transaction log records until after they are backed up. The full recovery model allows a database to be recovered to the point of failure, assuming that the tail of the log can be backed up after the failure. The full recovery model also supports restoring individual data pages.

For more information, see Backup Under the Full Recovery Model.
http://msdn.microsoft.com/en-us/library/ms190217.aspx


•Bulk-logged recovery model

This recovery model bulk logs most bulk operations. It is intended solely as an adjunct to the full recovery model. For certain large-scale bulk operations such as bulk import or index creation, switching temporarily to the bulk-logged recovery model increases performance and reduces log space consumption. Log backups are still required. Like the full recovery model, the bulk-logged recovery model retains transaction log records until after they are backed up. The tradeoffs are bigger log backups and increased work-loss exposure because the bulk-logged recovery model does not support point-in-time recovery. For more information, see Backup Under the Bulk-Logged Recovery Model http://msdn.microsoft.com/en-us/library/ms190692.aspx and Considerations for Switching from the Full or Bulk-Logged Recovery Model. http://msdn.microsoft.com/en-us/library/ms190203.aspx

For more details & comparison table please refer link below:


Ref: http://msdn.microsoft.com/en-us/library/ms189275.aspx  

How to stop the transaction log of a SQL Server database from growing unexpectedly

http://support.microsoft.com/kb/873235

A transaction log grows unexpectedly or becomes full on a computer that is running SQL Server

http://support.microsoft.com/kb/317375

SQL Server 2008 Transaction Log Truncation

http://technet.microsoft.com/en-us/library/ms189085.aspx

Thursday, April 8, 2010

Collaborative Application Markup Language [CAML]

Introduction to Collaborative Application Markup Language (CAML)

Collaborative Application Markup Language (CAML) is an XML-based language that is used in Windows SharePoint Services to define the fields and views used sites and lists. CAML is also used to define tables in the Windows SharePoint Services database during site provisioning.

Note: CAML is case-sensitive.

Site Customization with CAML

CAML can be used in various ways to customize a SharePoint site, including the following:

•In script or code that implements members of the Windows SharePoint Services object model, where CAML strings are passed through method parameters, assigned to properties, or returned by methods and properties

•In SOAP messaging that passes CAML strings to a Windows SharePoint Services Web service to interact remotely with a deployment

•In front-end site definitions used to instantiate SharePoint sites

•In Windows SharePoint Services Features to add specific functionality within a particular scope

Rendering with CAML

CAML is used for two types of rendering in Windows SharePoint Services: to define the type of data that is contained within a field, and to construct HTML that is displayed in the browser. For information on the two major uses of CAML, see Data-Defining Elements and HTML-Rendering Elements.

Programming with CAML

The following programming tasks and overview topics illustrate various ways in which CAML is used to customize site and list definitions:

Ref: http://msdn.microsoft.com/en-us/library/ms426449.aspx

-----------------------------------------

Data-Defining Elements


Collaborative Application Markup Language (CAML) has two major types of elements—those for page rendering and those for field rendering and schema definition. The CAML field rendering elements are designed for use when rendering individual field values. These can appear in field definitions, or more commonly, in FLDTYPES.XML at Local_Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\50\Templates\1033\xml.

A field is a column or an attribute of information that a user can add to a list. Each list on a Web site based on Microsoft Windows SharePoint Services has metadata stored in the List of Lists table in the database. The format of the schema is an XML structure, such as the following:

Each of the display modes (Display, Edit, New, etc.) contains a definition for how to render each of the field data types that are supported by Windows SharePoint Services.


For each display mode there is a display pattern, or CAML-rendering expression. Some CAML elements are used specifically in display patterns. Others can be used in either context, for page rendering or for field rendering, but are used primarily in rendering fields. The following intrinsic CAML-rendering elements are used to build templates that can include both static HTML and data, as well as metadata of the field being rendered

Ref: http://msdn.microsoft.com/en-us/library/dd586682(v=office.11).aspx
-----------------------------------------
Programming with the Microsoft.SharePoint and Microsoft.SharePoint.Administration Namespaces

Major top-level classes
The Microsoft.SharePoint and Microsoft.SharePoint.Administration namespaces provide types and members for working with lists and sites, as well as for managing a server or collection of servers running Microsoft® Windows® SharePoint™ Services. These namespaces have four major top-level classes:

•SPGlobalAdmin
•SPVirtualServer
•SPSite
•SPWeb

From these classes you can gain access to all the other classes to work with lists and Web sites, or to manage one or more servers. Starting with one of these classes, you can work through the object model to the class that you need to use. The following table briefly describes these four classes.

Ref: http://msdn.microsoft.com/en-us/library/dd586716(v=office.11).aspx

Saturday, March 20, 2010

Proxy Server

How to configure Internet Explorer to use a proxy server

You can configure Microsoft Internet Explorer to use a proxy server to connect to the Internet. A proxy server acts as a security barrier between your internal network and the Internet, keeping others on the Internet from being able to obtain access to information that is located on your internal network. This article describes how to configure Internet Explorer to use a proxy server over a Local Area Network (LAN) connection and lists the proxies that Internet Explorer supports.


Ref: http://support.microsoft.com/kb/135982
------------------------------------------------
How to configure client proxy server settings by using a registry file


To configure the proxy server settings on a client computer, create the following .reg file to populate the registry with the proxy server information:


[Code]

In this file, ProxyServername is the name of your proxy server.

You can also use the Internet Explorer Administration Kit (IEAK) to configure proxy server settings on client computers. For additional information about IEAK, visit the following Microsoft Web site:

http://technet.microsoft.com/en-us/ie/bb219520.aspx

Ref: http://support.microsoft.com/kb/819961

------------------------------------------------

How to use Proxy Server with Routing and Remote Access
You can use the Routing and Remote Access Server (RRAS) add-on for Microsoft Windows NT to create virtual private network (VPN) connections across the Internet. VPN connections use the Point-to-Point Tunneling Protocol (PPTP) protocol for encrypted communication across the Internet.


Microsoft Proxy Server is a network program that does not require routing. Operationally, this means that every packet that is transmitted to or from the proxy server is either sourced or destined with the proxy server's IP address.

For security reasons, the Proxy Server printed documentation recommends turning off IP forwarding on the computer on which Proxy Server is installed. However, when you install the Routing and Remote Access Update on a server that is running Microsoft Proxy Server, IP forwarding is now turned on. With IP forwarding on, a computer that is running Windows NT Server can forward packets correctly from the Internet connection to the internal network. If IP forwarding is enabled on a proxy server, all security features can be bypassed unless local host filters are configured. However, the PPTP client (the Microsoft Proxy Server) can make calls to the Internet because it is making a direct connection to the Internet and is the source of the PPTP connection. Any proxy clients that are behind the proxy server can also use the PPTP session that has been established. This is because after the PPTP connection is up, the Proxy server treats the PPTP connection like another network interface. ------------------------------------------------


Ref: http://support.microsoft.com/kb/169548
------------------------------------------------

Internet Explorer Uses Proxy Server for Local IP Address Even if the "Bypass Proxy Server for Local Addresses" Option Is Turned On


When you connect to a Web server using the Internet Protocol (IP) address or Fully Qualified Domain Name (FQDN) on the local network, Microsoft Internet Explorer or Windows Internet Explorer connects through an assigned proxy server even if the Bypass proxy server for local addresses option is turned on.


However, if you connect to a Web server using the host name (for example, http://webserver) instead of the IP address (for example, http://10.0.0.1) or FQDN (for example, http://webserver.domainname.com), the proxy server is bypassed and Internet Explorer connects directly to the server.
 
Ref: http://support.microsoft.com/kb/262981
------------------------------------------------

How to disable automatic proxy caching in Internet Explorer
 
When you configure Internet Explorer to use an automatic proxy configuration script, it caches the proxy that is returned by the FindProxyForURL call. The caching mechanism (Automatic Proxy Result Cache) is performed on a host basis (that is, not on an URL basis). This prevents you from using different proxies to gain access to the same Web server.
 
Ref: http://support.microsoft.com/kb/271361
 
--------------------------------------------------
 
Proxy Server Hardware and Software Requirements
Ref: http://support.microsoft.com/kb/164088
--------------------------------------------------
HOW TO: Set Up SQL Server with Proxy Server

Ref: http://support.microsoft.com/kb/216415

--------------------------------------------------
Using Server Proxy with SSL in Proxy Server 2.0
Ref: http://support.microsoft.com/kb/184030
--------------------------------------------------
How to: Bypass a Proxy Server for Local Web Requests



When you are using the ASP.NET Development Server to test your ASP.NET Web pages, you might receive a 502 error or an error indicating that the page cannot be displayed. If so, your browser might be unable to resolve a URL containing localhost and a port number, such as the following:

http://localhost:8080/MyWebSite/Default.aspx

You might be able to resolve this error by bypassing the proxy server for local Web requests, as described in the following procedure.

To bypass a proxy server for local Web requests
1.In Visual Web Developer, on the Tools menu, click Options.
2.In the Options dialog box, select the Show all settings check box.
3.Double-click Environment, click Web Browser, and then click the Internet Explorer Options button.
4.On the Connections tab of the Internet Properties property sheet, click LAN Settings.
5.On the Local Area Network (LAN) Settings property sheet, clear the Automatically detect settings check box.
6.Under Proxy server, select the Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections) check box.
7.Specify the address and port number that match your network, and then select the Bypass proxy server for local addresses check box.
8.Click OK, click OK, and then click OK again.
9.On the File menu, click Exit, and then re-open Visual Web Developer to apply the changes.

--------------------------------------------------

Proxy Configuration
A proxy server handles client requests for resources. A proxy can return a requested resource from its cache or forward the request to the server where the resource resides. Proxies can improve network performance by reducing the number of requests sent to remote servers. Proxies can also be used to restrict access to resources.

Adaptive Proxies
In the .NET Framework, proxies come in two varieties: adaptive and static. Adaptive proxies adjust their settings when the network configuration changes. For example, if a laptop user starts a dialup network connection, an adaptive proxy would recognize this change, discover and run its new configuration script, and adjust its settings appropriately.

Adaptive proxies are configured by a configuration script (see Automatic Proxy Detection). The script generates a set of application protocols and a proxy for each protocol.

Several options control how the configuration script is run. You can specify the following:

How often the configuration script is downloaded and run.
How long to wait for the script to download.
Which credentials your system should use to access the proxy.
Which credentials your system should use to download the configuration script.

Changes in the network environment may require that the system use a new set of proxies. If a network connection goes down or a new network connection is initialized, the system must discover the appropriate source of the configuration script in the new environment and run the new script.

Ref: http://msdn.microsoft.com/en-us/library/dkwyc043.aspx.

--------------------------------------------------

Document Versioning‏

Managing Versions and Checking Documents In and Out (Windows SharePoint Services 2.0)

Updated: 08-22-2005

Microsoft Windows SharePoint Services gives users the ability to keep versions of documents, and to check documents in and out.

About document versioning

Document versioning allows you to keep multiple versions of a document. If a change needs to be reversed, you can restore the previous version and continue working. A Version History command is included on the drop-down list users see when they click the arrow next to a document name and on the toolbar in the Edit Properties page for the document. The Version History command is also available in client applications compatible with Windows SharePoint Services, such as Microsoft Office Word 2003, Microsoft Office Excel 2003, and Microsoft Office PowerPoint 2003. When the user clicks Version History, a list of the previous versions of the document appears. The user can open an old version, restore a version (replacing the current version), or delete an old version.

When versioning is enabled, versions are automatically created whenever a user updates a document in a document library. Versions are created in the following situations:

When a user checks out a file, makes changes, and checks the file back in.
When a user opens a file, makes changes, and then saves the file for the first time.

Note:

If the user saves the file again, without closing the file, a new version is not created. If the user closes the application he or she is using to edit the file, and then opens it and saves the file again, another version is created.

When a user restores an old version of a file (and does not check it out).
When a user uploads a file that already exists, in which case the current file becomes an old version.

Ref: http://technet.microsoft.com/en-us/library/cc287876.aspx

--------------------------------------------------------

Introduction to versioning

Applies to: Microsoft Office SharePoint Server 2007, Windows SharePoint Services 3.0

Versioning enables you to store, track, and restore items in a list and files in a library as they are changed.

In this article
---------------------------------------
Overview
When versions are created
Working with major and minor versions
Version numbering
How versioning works with content approval
How versioning works with file check-out

---------------------------------------

Overview

When versions are tracked for lists or libraries, revisions to the items or files and their properties are stored. This enables you to better manage content as it is revised and even to restore a previous version — for example, if you make a mistake in the current version. Versioning is especially helpful when several people work together on projects, or when information goes through several stages of development and review.

Versioning is available for list items in all default list types — including calendars, issue tracking lists, and custom lists — and for all file types that can be stored in libraries — including Web Part Pages.

How versioning works with file check-out

Checking out files make the most of versioning. When you check out a file, a version is created only when you check the file back in, so that you can specifically designate when a version is created. When check-out is not required, a version is created when you first save a file, and then this version is updated when you close it. If you open and save the file again, another version is created. Depending on the situation, you might not intend for multiple versions to be created, for example, if you have to close a file to attend a meeting before you finish making changes to the file.

When check-out is required, you cannot add a file, change a file, or change the file's properties without first checking out the file. When you check in the file, you are prompted to provide comments about the changes that you made, which helps to create a more meaningful version history.

Ref: http://office.microsoft.com/en-us/sharepointtechnology/HA100215761033.aspx

--------------------------------------------------------

Monday, March 15, 2010

SharePoint Peoplepicker‏

Peoplepicker-searchadforests: Stsadm property (Office SharePoint Server)

Permits a user to search from a second one-way trusted forest or domain.

All servers in a farm need to be within one domain. Users in the forest that the server is in (that is, a resource forest) are displayed automatically. Forests that have at least a one-way trust to that forest can be searched for users to add.

When a Web application uses Windows authentication, People Picker searches all two-way trusted forests and all two-way trusted domains. However, if you want to search from a one-way trusted forest or a one-way trusted domain, you must run the setapppassword operation, and then run the peoplepicker-searchadforests property.

The peoplepicker-searchadforests property allows you to search multiple values when users are selected. You also can add multiple forests, domains, accounts, and even specific property searches.

Note:

By default, Microsoft Office SharePoint Server 2007 talks to the domain controller for the domain in which Office SharePoint Server 2007 was installed and all trusted domains for two-way trusted domains.

Examples

Search additional domains or forests

To enumerate a list of users by using People Picker from a second forest or domain, use the following syntax:

stsadm –o setproperty –pn peoplepicker-searchadforests –pv [list of forests or domains] -url [WebApp]

Specify user account and password from a one way trust

To specify the user name and password from a one-way trust, so that People Picker can look up this information, use the following syntax:

stsadm -o setproperty -url http://[server:port] -pn peoplepicker-searchadforests -pv "forest:contoso.corp.com;domain:bar.contoso.corp.com", [LoginName], [Password]

Ref: http://technet.microsoft.com/en-us/library/cc263460.aspx

-------------------------------------------------------------

Examples

To create a custom filter that searches for the user "David" in the Active Directory in the Contoso domain, use the following syntax:

stsadm -o setproperty -url http://contoso -pn "peoplepicker-searchadcustomfilter -pv (
(Title=David))

To view the current setting for the searchadcustomfilter property, use the following syntax:

stsadm -o getproperty -url http://server_name -pn peoplepicker- searchadcustomfilter

Ref: http://technet.microsoft.com/en-us/library/cc263452.aspx

-------------------------------------------------------------

The following table describes the peoplepicker properties.

Property name Description

Peoplepicker-activedirectorysearchtimeout

Configures the timeout when a query is issued to Active Directory.

Peoplepicker-distributionlistsearchdomains

Restricts the search of a distribution list to a specific subset of domains.

Peoplepicker-nowindowsaccountsfornonwindowsauthenticationmode

Specifies not to search Active Directory when the current port is using forms-based authentication.

Peoplepicker-onlysearchwithinsitecollection

Displays only users that are members of the site collection.

Peoplepicker-searchadcustomquery

Permits the administrator to set the custom query that is sent to Active Directory.

Peoplepicker-searchadforests

Permits a user to search from a second one-way trusted forest or domain.

Ref: http://technet.microsoft.com/en-us/library/cc263318.aspx

-------------------------------------------------------------

The Check Names function does not honor the Peoplepicker-onlysearchwithinsitecollection setting in Windows SharePoint Services 3.0

Ref: http://support.microsoft.com/kb/967135

-------------------------------------------------------------

Configure connections to Profile Services

Updated: 2009-03-26

In this article:
• Add import connections
• Configure import connections
• Configure user profiles

Personal information about the users in your organization is stored in directory services and line-of-business applications and imported to the user profile store so that it can be used to present personalized or targeted content in sites, and to search for people in your organization.

When the administrator of the Shared Services Provider (SSP) configures user profile imports, the import connections necessary for those settings are configured automatically except for custom connections. Custom import connections must be configured separately.

Add import connections

The administrator of personalization services for the SSP configures import connections, adding accounts for all users who are sharing personalized information by using the SSP. In deployments that have groups of isolated users, personalized information is isolated by using multiple SSPs. In deployments that have multiple SSPs, the SSP administrator must add connections between SSPs.

Connections to directory services can include Active Directory directory services and Lightweight Directory Access Protocol (LDAP) directory services. You can add a connection to the Business Data Catalog, but it is recommended that you first add import connections for directory services.

Most of these connections are configured automatically when import settings are configured. You can change the default configuration options or add custom import connections.

Use the following procedure to add an import connection.

Configure user profiles

You can add properties to user profiles other than those that are imported from directory services and the business data catalog. These properties can be mapped to existing properties so that their values can be automatically updated during profile imports.

During initial deployment, add the additional properties that you identified during user profile planning.

Use the following procedure to add properties to user profiles.

Ref: http://technet.microsoft.com/en-us/library/cc263320.aspx

-------------------------------------------------------------

I would like to validate a People Editor field. I have tried using the property Allow Empty, but unfortunately it doesn’t work. I have used a Required field validator. Luckily it works to some extent. But the problem starts if there is any post back happening on the page. After the post back, it takes the value to be empty even if there is an entry in the control.

Could anyone help me if there is any particular property to be enabled or any other solution to achieve the validations on People Editor Control

• I had the exact same problem on a custom application page.

I solved it with a Custom Field Validator using client side validation

[script language="javascript"]

function CheckProjectManager(source, arguments) {

if (aspnetForm.ctl00_PlaceHolderMain_ProjectManager_downlevelTextBox.value == "")

arguments.IsValid = false;

else

arguments.IsValid = true;

}

[/script]



[SharePoint:PeopleEditor

ID="ProjectManager"

AllowEmpty="false"

ValidatorEnabled="true"

MultiSelect="false"

runat="server"

SelectionSet="User"

Width="200px"

TabIndex="2" /] 

[asp:CustomValidator

ID="rfvProjectManager"

runat="server"

ControlToValidate=""

ErrorMessage="Required"

Enabled="true"

ClientValidationFunction="CheckProjectManager"]

[/asp:CustomValidator]

Note that the ControlToValidate on the CustomValidator is set to ""

The ID for the People Editor ctl00_PlaceHolderMain_ProjectManager_downlevelTextBox was found using IE Developer Toolbar, Note that downlevelTextBox contains the validated userid e.g. DOMAIN\USERID after pressing check user in the peopleeditor.

/Jan Lange

Ref: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/7ea35995-b907-48a4-8a44-cfbd7b549b2b

-------------------------------------------------------------
Non-Microsoft Article
******************************************
Ref: http://vspug.com/dwise/2008/05/01/inside-the-sharepoint-people-picker/

Inside the SharePoint People Picker
SharePoint provides a handy control commonly known as a "people picker" that allows users to search for and select users defined at some specified scope. This control is normally associated with Personnel field in a SharePoint List. However, what happens when you need to add this functionality to some custom component and need to access it programmatically? It gets a lot more complicated!

This article is meant as more of a repository of knowledge that I've discovered while working with this control rather than a "how-to". If you are looking for How-To articles, try these: Eric Kraus or SharePoint Tips. Likewise, please let me know if you have any additional information about the actual workings of this poorly documented control.

Where to find the control
The control is actually called a "PeopleEditor" and is in the 'Microsoft.SharePoint.WebControls' namespace. You will need to add a reference to 'Microsoft.Sharepoint.dll' to your project in Visual Studio, which is something you probably already have if you are writing anything that works with SharePoint.

What is it?
The PeopleEditor is simply a standard UserControl with it's own hierarchy of elements. If you were to walk the tree of controls used, you would see the structure shown below (control IDs are in green italics).

Microsoft.SharePoint.WebControls.PeopleEditor
|-System.Web.UI.HtmlControls.HtmlInputHidden (hiddenSpanData)
|-System.Web.UI.HtmlControls.HtmlInputHidden (OriginalEntities)
|-System.Web.UI.HtmlControls.HtmlInputHidden (HiddenEntityKey)
|-System.Web.UI.HtmlControls.HtmlInputHidden (HiddenEntityDisplayText)
|-System.Web.UI.WebControls.Table (OuterTable)
|- |-System.Web.UI.WebControls.TableRow
|- |- |-System.Web.UI.WebControls.TableCell
|- |- |- |-System.Web.UI.WebControls.Table
|- |- |- |- |-System.Web.UI.WebControls.TableRow
|- |- |- |- |- |-System.Web.UI.WebControls.TableCell
|- |- |- |- |- |- |-System.Web.UI.HtmlControls.HtmlGenericControl (upLevelDiv)
|- |- |- |- |- |- |-System.Web.UI.WebControls.TextBox (downlevelTextBox)
|- |- |-System.Web.UI.WebControls.TableCell
|- |- |- |-System.Web.UI.WebControls.HyperLink (checkNames)
|- |- |- |-System.Web.UI.LiteralControl
|- |- |- |-System.Web.UI.WebControls.HyperLink (browse)
|- |- |- |-System.Web.UI.LiteralControl
|- |- |- |-System.Web.UI.HtmlControls.HtmlInputButton (CreateItem)
|- |-System.Web.UI.WebControls.TableRow
|- |- |-System.Web.UI.WebControls.TableCell
|- |- |- |-System.Web.UI.WebControls.PlaceHolder
|- |- |- |- |-System.Web.UI.WebControls.Label (errorLabel)
|- |- |- |- |-System.Web.UI.WebControls.Table
|- |-System.Web.UI.WebControls.TableRow
|- |- |-System.Web.UI.WebControls.TableCell
|- |- |- |-System.Web.UI.WebControls.Label

Of particular interest are upLevelDiv and downlevelTextBox as those are the controls used when a person is manually entering a name.
*****************************************

Friday, March 12, 2010

Onet.xml

Onet.xml
When you install Windows SharePoint Services 3.0, six Onet.xml files are placed within the setup directory, one in \Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\GLOBAL\XML that applies globally to the deployment, and five in different folders within ...\TEMPLATE\SiteTemplates that apply to each of the five site definitions that ship with Windows SharePoint Services 3.0. They are Blog sites, the central administration site, Wiki sites, Meeting Workspace sites, and team SharePoint sites. Only the last two of these families contain more than one site definition configuration in Windows SharePoint Services 3.0.

The global Onet.xml file defines list templates for hidden lists, list base types, a default definition configuration, and modules that apply globally to the deployment. The five Onet.xml files in the \SiteTemplates directory define navigational areas, list templates, document templates, configurations, modules, components, and server e-mail footer sections used in the five site definitions.

Functions of Onet.xml
Depending on its particular use, an Onet.xml file can serve multiple functions, such as the following:

Define the top and side navigation areas that appear on the home page and in list views for a site definition.

Specify the list definitions that are used in each site definition and whether they are available for creating lists on the Create page.

Specify document templates that are available in the site definition for creating document library lists on the New page, and specify the files used in the document templates.

Define the base list types from which default Windows SharePoint Services lists are derived. (Only the global Onet.xml file serves this function.)

Specify the configurations of lists and modules that are used within each site definition.

Specify Windows SharePoint Services components.

Define the footer section used in server e-mail.

Web Site Definition Tasks with Onet.xml
The following kinds of tasks can be performed in a custom Onet.xml to create a custom site definition:

Specify an alternate cascading style sheet (CSS) file, JavaScript file, or ASPX header file for a site definition.

Modify navigation areas for the home page and list pages.

Add a list definition as an option to the Create page.

Add a document template for creating document libraries.

Define one or more configurations for the site definition, specifying the lists, modules, files, and Web Parts that are included when a site definition configuration is instantiated.

Caution:
Making changes to an originally installed Onet.xml file on a server running Windows SharePoint Services can break existing sites, and the changes may be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next product version. Always create a new Onet.xml; do not modify the original file. For more information, see How to: Create a Custom Site Definition and Configuration.

Ref: http://msdn.microsoft.com/en-us/library/ms474369.aspx
------------------------------------
Site Definition (Onet.xml) Files
In an Onet.xml file, the Feature element is used within a site definition configuration to contain a reference to a Feature instance and default property values. The Configuration element specifies lists and modules to use when creating SharePoint sites. For information about the format and elements used in site definitions, see Site Schema.

The site definition file format for Windows SharePoint Services 3.0 retains full backwards compatibility with the site definition file format of Onet.xml in Windows SharePoint Services 2.0.

Windows SharePoint Services activates Features specified within the Onet.xml file in the order that they are listed. Consequently, you must specify Features that are depended upon before Features that depend upon them.

Example
The following example shows the Feature element used to specify Features and Feature properties in a site definition configuration.

Ref: http://msdn.microsoft.com/en-us/library/ms432370.aspx

------------------------------------

Working with Features

Features reduce the complexity involved in making simple site customizations, and are robust when upgrades are applied to a deployment. Features eliminate the need to copy large chunks of code to change simple functionality. Features thus reduce versioning and inconsistency issues that may arise among front-end Web servers. Features make it easier to activate or deactivate functionality in the course of a deployment, and administrators can easily transform the template or definition of a site by simply toggling a particular Feature on or off in the user interface. Features provide the following capabilities:

Scoping semantics for determining where custom code runs

Pluggable behavior for installing or uninstalling Features within a deployment

Pluggable behavior for activating or deactivating Features at a given scope

A scoped property bag for storing data required by a Feature within its scope

The basis of a unified framework for distributed deployment of Windows SharePoint Services solutions

Feature Implementation
To implement a Feature you add a subfolder containing a Feature definition within the Features setup directory (Local_Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES). The Feature subfolder includes a Feature.xml file that defines the base properties of the Feature and lists elements bound to it, such as XML files containing element manifests and any other supporting files. A Feature folder may contain only a Feature.xml file, or it may contain a Feature.xml file and any number of supporting element files, including XML files, but also .aspx, .htm, .xsn, .resx, .dll, and other file types.

Note:
When you create a folder within the Features directory through Windows Explorer by right-clicking a folder, pointing to New, and then clicking Folder, the new folder does not have inherited permissions. If you deploy a Feature in the folder, then some Windows SharePoint Services pages, such as for site settings or list views, throw an exception. You can fix this problem by right-clicking the new folder, click Properties, click Security, and then click Advanced. On the Permissions tab, delete uninherited permissions from the folder. You can also fix this problem by creating the new folder at the command prompt through the md command.

After creating the Feature folder, you can install and activate the Feature through command-line operations of stsadm.exe, or through the object model. You can also activate a Feature through the user interface. Installing a Feature makes its definition and elements known throughout a server farm, and activating the Feature makes the feature available at a particular scope.

Ref: http://msdn.microsoft.com/en-us/library/ms460318.aspx
------------------------------------
Understanding Onet.xml Files[This documentation is preliminary and is subject to change.]

When SharePoint Foundation is installed, several Onet.xml files are installed, one in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\GLOBAL\XML that applies globally to the deployment, and several in different folders within %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates. Each in the latter group corresponds to a site definition that ships with SharePoint Foundation. They include, for example, Blog sites, the central administration site, Meeting Workspace sites, and team SharePoint sites. Only the last two of these families contain more than one site definition configuration.

The global Onet.xml file defines list templates for hidden lists, list base types, a default definition configuration, and modules that apply globally to the deployment. Each Onet.xml file in a subdirectory of the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates directory can define navigational areas, list templates, document templates, configurations, modules, components, and server e-mail footers used in the site definition to which it corresponds.

Ref: http://msdn.microsoft.com/en-us/library/ms474369(office.14).aspx 
------------------------------------

Thursday, March 11, 2010

SQL 2005 & 2008 Database Mirroring

Database Mirroring in SQL Server 2005

----------------------------------------------------

Important:

Microsoft support policies only apply to the database mirroring feature as delivered with SQL Server 2005 Service Pack 1 (SP1) onwards. If you are not running SQL Server 2005 with SP1 or later, database mirroring should not be used in production environments. Microsoft support services will not support databases or applications that use database mirroring from the RTM release.

Introduction

Database mirroring is a new SQL Server 2005 technology available for review for increasing database availability. Database mirroring transfers transaction log records directly from one server to another and can quickly fail over to the standby server. You can code client applications to automatically redirect their connection information, and in the event of a failover, automatically connect to the standby server and database. Fast failover with minimal data loss has traditionally involved higher hardware cost and greater software complexity. Database mirroring, however, can fail over quickly with no loss of committed data, does not require proprietary hardware, and is easy to set up and manage.

Database Mirroring Overview

In database mirroring, an originating SQL Server 2005 instance continuously sends a database's transaction log records to a copy of the database on another standby SQL Server instance. The originating database and server have the role of principal, and the receiving database and server have the role of mirror. The principal and mirror servers must be separate instances of SQL Server 2005.

In all SQL Server databases, data changes are recorded in the transaction log before any changes to actual data pages are made. The transaction log records are placed first in a database's log buffer in memory, and then flushed to disk (or 'hardened') as quickly as possible. In database mirroring, as the principal server writes the principal database's log buffer to disk, it simultaneously sends that block of log records to the mirror instance.

When the mirror server receives a block of log records, it places the log records first into the mirror database's log buffer and then hardens them to disk as quickly as possible. Those transaction log records are later replayed on the mirror. Because the mirror database replays the principal's transaction log records, it duplicates the database changes on the principal database.

The principal and mirror servers are each considered a partner in the database mirroring session. A database mirroring session consists of a relationship between the partner servers when they mirror a database from one partner to another. A given partner server may have the principal role for one database and a mirror role for a different database.

In addition to the two partner servers (principal and mirror) a database mirroring session may have an optional third server, called the witness. The witness server's role is to enable automatic failover. When database mirroring is used for high availability, if a principal server suddenly fails, if the mirror server has confirmation from the witness, it can automatically take on the role of principal and make its database available within a few seconds.

Some important items to note about database mirroring:

· The principal database must be in the FULL recovery model. Log records that result from bulk-logged operations cannot be sent to the mirror database.

· The mirror database must be initialized from a restore of the principal database with NORECOVERY, followed by restores in sequence of principal transaction log backups.

· The mirror database must have the same name as the principal database.

· Because the mirror database is in a recovering state, it cannot be accessed directly. You can create database snapshots on the mirror to indirectly read the mirror database at a point in time. (See 'Database Mirroring and Database Snapshots' later in this paper.)

Note: For more information about the terms related to database mirroring, see "Overview of Database Mirroring" in SQL Server 2005 Books Online.

Operating Modes

There are three possible operating modes for a database mirroring session. The exact mode is based on the setting of transaction safety and whether a witness server is part of the mirroring session.

Table 1: Database Mirroring Operating Modes

Operating Mode

Transaction safety

Transfer mechanism

Quorum required

Witness server

Failover Type

High Availability

FULL

Synchronous

Y

Y

Automatic or Manual

High Protection

FULL/Synchronous

If safety is FULL and a witness is set, synchronous data transfer will occur, and a quorum is required for database service. A quorum vote requires at least two servers to decide which role, principal or mirror, each of the two partner servers should play.

In order to explore the three operating modes in more detail, let's first take a closer look at transaction safety and the role of a quorum.

Ref: http://msdn.microsoft.com/en-us/library/cc917680.aspx 

----------------------------------------------------

How to: Configure a Database Mirroring Session (SQL Server Management Studio)

To establish a database mirroring session and to modify the properties of database mirroring for a database, use the Mirroring page of the Database Properties dialog box.

Before you use the Mirroring page to configure database mirroring, ensure that the following requirements have been met:

The principal and mirror server instances must be running the same edition of SQL Server—either Standard or Enterprise. Also, we strongly recommend that they run on comparable systems that can handle identical workloads.

Note:

The witness server instance can run on SQL Server Standard, Enterprise, Workgroup, or Express.

The mirror database must exist and be current.

Creating a mirror database requires restoring a recent backup of the principal database (using WITH NORECOVERY) on the mirror server instance. It also requires taking one or more log backups after the full backup and restoring them in sequence to the mirror database (using WITH NORECOVERY). For more information, see How to: Prepare a Mirror Database for Mirroring (Transact-SQL).

If the server instances are running under different domain user accounts, each requires a login in the master database of the others. If the login does not exist, you must create it before configuring mirroring. For more information, see How to: Allow Database Mirroring Network Access Using Windows Authentication (Transact-SQL).

Ref: http://technet.microsoft.com/en-us/library/ms188712.aspx

----------------------------------------------------
Tasks

How to: Pause or Resume a Database Mirroring Session (SQL Server Management Studio)
http://technet.microsoft.com/en-us/library/ms175082.aspx

How to: Set Up a Mirror Database to Use the Trustworthy Property
http://technet.microsoft.com/en-us/library/ms345401.aspx

How to: Remove Database Mirroring (SQL Server Management Studio)
http://technet.microsoft.com/en-us/library/ms190471.aspx

How to: Add or Replace a Database Mirroring Witness (SQL Server Management Studio)
http://technet.microsoft.com/en-us/library/ms365603.aspx

Concepts

Automatic Failover
http://technet.microsoft.com/en-us/library/ms189590.aspx

Preparing a Mirror Database for Mirroring
http://technet.microsoft.com/en-us/library/ms189053.aspx

Forced Service (with Possible Data Loss)
http://technet.microsoft.com/en-us/library/ms189977.aspx

Managing Logins and Jobs After Role Switching
http://technet.microsoft.com/en-us/library/ms191458.aspx
Manual Failover
http://technet.microsoft.com/en-us/library/ms191449.aspx

Managing Metadata When Making a Database Available on Another Server Instance
http://technet.microsoft.com/en-us/library/ms187580.aspx

Other Resources

Database Properties (Mirroring Page)
http://technet.microsoft.com/en-us/library/ms183684.aspx

Setting Up Database Mirroring
http://technet.microsoft.com/en-us/library/ms190941.aspx

----------------------------------------------------

How to: Prepare a Mirror Database for Mirroring (Transact-SQL)

The mirror database must exist before a database mirroring session can begin. The name of the mirror database must be the same as the name of the principal database. The database owner or system administrator can create the mirror database from a recent full backup of the principal database and at least one subsequent log backup. For mirroring to work, the mirror database must remain in the RESTORING state. Therefore, when you restore a backup to a mirror database, you must always use WITH NORECOVERY for every restore operation.

If mirroring has been removed and the mirror database is still in the RECOVERING state, you can restart mirroring. However, first, at least one log backup must be taken on the principal database. Then, on the mirror database, you must restore WITH NORECOVERY all log backups that were taken on the principal database since mirroring was removed.

Note:

You cannot mirror the master, msdb, temp, or model system databases.

Ref: http://technet.microsoft.com/en-us/library/ms189047.aspx  

----------------------------------------------------

Tuesday, March 9, 2010

SharePoint Object Model‏

Best Practices: Common Coding Issues When Using the SharePoint Object Model

Overview
Developers who write custom code with the SharePoint object model will encounter common issues related to performance, extensibility, and scalability. This article is a resource for developers who are working to troubleshoot and improve the performance of existing SharePoint applications or who are writing new SharePoint applications. In both cases, it is important to understand how to make the SharePoint object model work efficiently, and how to apply general programming techniques (such as caching and threading) to the SharePoint platform specifically. This information can make it easier to design your applications correctly, find and fix problem areas in your code, and avoid known pitfalls of using the SharePoint object model.

The following areas reflect the most common general concerns encountered by SharePoint developers:

Using SharePoint data and objects efficiently
Performance concerns related to folders, lists, and SPQuery objects
Writing applications that scale to large numbers of users
Using Web controls and timer jobs
Disposing of SharePoint objects
This article addresses all but the last of these issues. For guidance on disposing of SharePoint objects, see Best Practices: Using Disposable Windows SharePoint Services Objects.

Additionally, we recommend that you read the following orientation topics as good starting points for using the SharePoint object model:

Server and Site Architecture: Object Model Overview
Understanding the Administrative Object Model of Windows SharePoint Services 3.0

Ref: http://msdn.microsoft.com/en-us/library/bb687949.aspx#WSS3CodingSharePointOM_OverviewofCommonCodingIssueswiththeSharePoin
---------------------------------

Namespaces in the Windows SharePoint Services Object Model

The Windows SharePoint Services object model consists of forty-two namespaces in ten assemblies that are used in SharePoint sites on the server that is running Windows SharePoint Services.

Ref: http://msdn.microsoft.com/en-us/library/ms453225.aspx

----------------------------------

Windows SharePoint Services 3.0: Software Development Kit (SDK)

Brief Description
The Windows SharePoint Services 3.0 software development kit (SDK) contains conceptual overviews, programming tasks, samples, and references to guide you in developing solutions based on Windows SharePoint Services 3.0.

Overview
The Windows SharePoint Services 3.0 SDK contains conceptual overviews, programming tasks, and references to guide you in developing solutions based on Windows SharePoint Services as a platform. The SDK includes information about the following technologies:

Web Part Framework Create, package, and deploy Web Parts on SharePoint sites.
Server-side object model Work with individual lists and sites or manage an entire Windows SharePoint Services deployment.
Web services Use default Web services, or create custom Web services, to interact with Windows SharePoint Services from external applications.
Collaborative Application Markup Language (CAML) Customize the schemas that define lists and sites, define queries for use with members of the object model or Web services, and specify parameters for use with methods in Remote Procedure Call (RPC) protocol.
Master Pages Specify all of the shared elements of your site in the master page or pages, and add content page-specific elements to content pages.
Workflows Create workflows that encapsulate business processes to be performed on items in Windows SharePoint Services, and attach those workflows to items in Windows SharePoint Services.
Custom Field Types Create custom field types that conform to your business data. These custom field types can be based on the base field types already included in Windows SharePoint Services, and can include custom data validation, field rendering, and field property rendering and processing.
Information Rights Management (IRM) Specify IRM for files located in document libraries and stored as attachments to list items. Create IRM protectors for your own custom file types.
Document Property Promotion and Demotion Use the built-in XML parser to synchronize the document properties and list column data for XML documents. Create document parsers to do the same for your custom file types.
Search Use the new Query object model and Query Web service to retrieve search results. Search in Windows SharePoint Services now shares the same SharePoint search technology used by Microsoft Office SharePoint Server 2007.

Ref: http://www.microsoft.com/downloads/details.aspx?FamilyId=05E0DD12-8394-402B-8936-A07FE8AFAFFD&displaylang=en

----------------------------------

Best Practices: SharePoint Object Model for Performance Tuning

While working with SharePoint object model, most of developers will use SPWeb, SPSite, SPList objects intensively.

I had worked with some customers who reported performance issues in their production environment after their project deployment. Their code works well in most of the scenarios but whenever the data get increases then there might be potential performance hits because of not handling the APIs properly.

In this post I will give information about some common methods that we are using in most of the scenarios and very important points that we need to remember in perspective of application’s performance. We do have two cool MSDN articles gives information about the best practices with SharePoint object model and I will recommend you all to go through those articles as well. Also we do have an excellent blog by Roget Lamb by giving the detailed information of Dispose Patterns with examples.

Best Practices: Common Coding Issues When Using the SharePoint Object Model

Best Practices: Using Disposable Windows SharePoint Services Objects

Roger Lamb’s cool post about SharePoint 2007 and WSS 3.0 Dispose Patterns by Example

Lots of situations where we will use APIs for retrieving information about Lists and List Items. In SharePoint, lists are the objects storing large amount of data. So we need to be little cautious while working with those APIs, because internally those APIs are calling some SQL queries to pull the data which has been stored the SharePoint Content DBs.

The performance issues may happen in some cases if numbers of lists are very high or in some cases total number of lists will be less but the items will be very large.

Ref: http://blogs.msdn.com/sowmyancs/archive/2008/10/26/best-practices-sharepoint-object-model-for-performance-tuning.aspx
----------------------------------

Sunday, March 7, 2010

A Developer's Introduction to Web Parts

What are Web Parts, Web Part zones, and Web Part Pages?

Web Parts: Web Parts are modular units of information that consist of a title bar, a frame, and content. Web Parts allow you to create personalized user interfaces by simply dragging individual Web Parts onto a Web page. Each Web Part makes certain content or data available on a page, and may also make it possible for the user to work with or modify that data through the browser. By using the Web Parts located on pages in a SharePoint site, users can access data from both inside and outside their organizations.

Web Part zones: A Web Part zone is a Web Part container that can be configured to control the organization and format of the Web Parts that are contained in it. Web Part zones make it possible not only to group and arrange Web Parts, but also to customize them in the browser and to control who can modify them there. Each of the individual Web Parts on a Web Part Page may or may not be located within a Web Part zone: Web Part Pages: When they are in use, Web Parts reside on a Web Part Page, which is a special type of Microsoft ASP.NET (ASPX) page that contains at least one Web Part or Web Part zone. When you use Office SharePoint Designer 2007 to add a Web Part or Web Part zone to a blank ASPX page, that page automatically becomes a Web Part Page and acquires the necessary page directive that identifies it as a Web Part Page.




Ref: http://office.microsoft.com/en-us/sharepointdesigner/HA101487201033.aspx

********************************************
A Developer's Introduction to Web Parts Web Parts Infrastructure

The new Web Parts infrastructure builds on ASP.NET by providing a .NET object model that contains classes that derive from and extend ASP.NET classes. Additional classes and database objects handle storage (in Microsoft SQL Server(tm) or MSDE) and site administration. Web Parts are ASP.NET server controls. To create a new type of Web Part, you create an ASP.NET custom control. However, unlike standard ASP.NET controls, which are added to Web form pages by programmers at design time, Web Parts are intended to be added to Web Part Zones on Web Part Pages by users at run time. Depending on which site groups users are assigned to, and depending on the rights assigned to those groups, users can have varying levels of freedom to modify Web Parts and Web Part Pages. They can make changes that apply to all the users of a shared page, or they can make changes that apply only when they view the page. In many ways, Web Parts blur the traditional distinction between design time and run time. The run-time experience of a user working with Web Parts in a browser is similar to the design-time experience of a Microsoft Visual Basic® programmer adding controls to a form and setting their properties. Web page designers can also build Web Part Pages in Microsoft Office FrontPage® 2003, which is able to render Web Parts in the design environment. Web Parts rely heavily on Windows SharePoint Services to support: 1. Creation of new sites and new pages 2. Management of the user roster for a site 3. Storage of Web Part customizations, including shared and personal property settings 4. Administration of site backups and storage limits 5. A scalable architecture that can handle thousands of sites and millions of users 6. Assignment of users to customizable site groups Note Microsoft SharePoint Products and Technologies no longer rely on role-based security for assigning rights and permissions to users. Instead, SharePoint Products and Technologies use site groups and cross-site groups to assign rights and permissions to users. Site groups are custom security groups that apply to a specific Web site. Cross-site groups are custom security groups that apply to more than one Web site. For more information, see Microsoft Windows SharePoint Services Help. In turn, SharePoint Products and Technologies rely on Web Parts to provide configurable and extensible user interfaces. Adding Web Parts to a Web Part Page Windows SharePoint Services provides four types of galleries that can contain Web Parts: 1. Virtual Server gallery 2. gallery 3. Web Part Page gallery 4. Online gallery The Virtual Server Gallery lists Web Parts that are available to all sites on the server. The Gallery contains Web Parts that are available to a particular site. By default, when you run Stsadm.exe to install a Web Part, Stsadm.exe adds the Web Part to the Virtual Server Gallery. More information about how to work with the administration tools available in Windows SharePoint Services to populate the Web Site gallery is available later in this article. A Web Part Page gallery contains Web Parts that are already added to the current page. This may seem paradoxical at first. Why would you need to add a Web Part that is already added to the page? The reason this is useful is that you can add a Web Part to a page and then close the Web Part. To close a Web Part, click the arrowhead on the right side of the Web Part title bar, and then click Close. A closed Web Part is no longer visible on the page, but it is still a member of the Web Part Page gallery for that page. The Web Part is still associated with the page by an entry in the configuration database of the server running Windows SharePoint Services, which also stores any shared or personalized property settings for the Web Part. You can add a Web Part to a page, personalize it extensively, close it, and then later add it back to the page with the personalization intact. To bring back a closed Web Part, select it from the Web Part Page gallery. Installing to the GAC for Full Trust If you give your Web Part assembly a strong name, you have one more option for elevating its trust level. You can install your assembly in the Global Assembly Cache so it automatically executes with full trust. The reason for this becomes clear if you inspect the policy files for Windows SharePoint Services. Even the Wss_minimaltrust.config file includes the following code group: When you use the Stsadm.exe utility to install a Web Part .cab file for an assembly that has a strong name, you can use the globalinstall command line switch to install it to the GAC, as follows: Stsadm.exe -o addwppack -filename path_to_Web_Part.cab file -globalinstall You can also manually install a strong-named Web Part assembly to the GAC by dragging the .dll file for the Web Part to the following special folder: local_drive:\Windows\Assembly A special Wpresources folder location is used for all Web Parts that are installed to the GAC: local_drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources One advantage of using URLs based on the Wpresources directory is that the Web Part infrastructure automatically looks for your files in the appropriate location, depending on whether a Web Part is installed to the bin directory for a virtual server or to the GAC. However, relying on the GAC is another example of an easy but potentially dangerous way to add permissions to your Web Part, because Web Parts installed in the GAC always run with full trust. A better practice is to give your code only the permissions that it needs, and no more. Web Parts installed to the GAC also automatically become available to every virtual server on that computer, which you may not want. When you install to a Bin directory, you can limit your Web Part to a single virtual server and limit the permissions available to your Web Part.

Ref: http://msdn.microsoft.com/en-us/library/dd583154(office.11).aspx

 ********************************************
What is a Web Part zone? A Web Part zone is a Web Part container that can be configured to control the organization and format of the Web Parts contained in it. Web Part zones make it possible not only to group and arrange Web Parts but also to customize them in the browser and to control who can modify them there. Each of the individual Web Parts on a Web Part Page may or may not be located within a Web Part zone: Web Parts located in a Web Part zone When a Web Part is located inside a Web Part zone, the Web Part properties are stored in the content database in Microsoft Windows SharePoint Services 3.0, not in the ASPX page. By inserting a Web Part inside a zone, you make it possible for users to interact with or modify that Web Part through the browser. Web Parts not located in a Web Part zone When a Web Part is not located inside a Web Part zone, the Web Part properties are stored in the ASPX page and not in the content database in Windows SharePoint Services 3.0. By inserting a Web Part without enclosing it in a zone, you allow users to view the Web Part, but you prevent them from interacting with or modifying the Web Part through the browser. This can be useful if you do not want users to be able to make any changes, either to the Web Part or to the way that it is displayed on the page. You can think of Web Parts, Web Part zones, and Web Part Pages as nested containers. The Web Parts themselves contain the data that you want to view and perhaps to change or interact with. The Web Part zones are optional subcontainers within the Web Part Page, each of which contains one or more Web Parts - making it possible to group and arrange those Web Parts on the page, to customize them while viewing them in the browser, and to specify who has permissions to view and to customize them in that way. And the Web Part Page contains both the Web Parts and the Web Part zones.

Ref: http://office.microsoft.com/en-us/sharepointdesigner/HA101513941033.aspx

 ********************************************
Walkthrough: Creating a Basic SharePoint Web Part
This programming task includes the steps for creating a basic custom Windows SharePoint Services Web Part. It is a simple Web Part that allows you to change the Web Part's Title property, which is a Windows SharePoint Services WebPart base class property that sets the text in the title bar of the Web Part. Important: Beginning with Windows SharePoint Services 3.0, the Windows SharePoint Services Web Part infrastructure is built on top of the Microsoft ASP.NET 2.0 Web Part infrastructure and Web Parts that derive from the ASP.NET WebPart class are completely supported in Windows SharePoint Services. You should create ASP.NET Web Parts whenever possible. For more information about choosing the best Web Part base class from which to derive, see Developing Web Parts in Windows SharePoint Services in the Windows SharePoint Services Software Development Kit (SDK). For more information about ASP.NET Web Parts, see the Web Parts Control Set Overview in the ASP.NET documentation. Prerequisites Microsoft Visual Studio 2005 Windows SharePoint Services 3.0
Ref: http://msdn.microsoft.com/en-us/library/ms452873.aspx
 ********************************************
 Walkthrough: Creating a Basic Web Part
This walkthrough provides the steps for creating a basic custom Web Part that can be added to your Web Part Pages. It is a simple Web Part that allows the user to define a custom message to be displayed inside the Web Part. This Web Part will derive from the ASP.NET 2.0 Web Part class, which is the recommended practice for Windows SharePoint Services. Note that this walkthrough describes how to create a Web Part without the Visual Studio Extensions for Windows SharePoint Services. For more information about ASP.NET Web Parts, see the following ASP.NET documentation: ASP.NET QuickStart Tutorials and ASP.NET Web Parts Controls. Note: You can also develop your Web Parts by using the Visual Studio Extensions for Windows SharePoint Services. By using these extensions, you can greatly reduce the work involved in creating and deploying your Web Parts. The extensions require development in a server environment, and offer the following benefits: Automatic generation of your solution package Automatic generation of the WebPart XML file Ability to deploy Web Parts directly from inside Visual Studio to your Web site For guidance on using the extensions or to download extensions for Visual Studio 2005 or Visual Studio 2008, see Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions User Guide, Version 1.1 Windows SharePoint Services 3.0 Tools: Visual Studio Extensions, Version 1.1 Windows SharePoint Services 3.0 Tools: Visual Studio Extensions, Version 1.2 Prerequisites Windows SharePoint Services 3.0 Visual Studio 2005

Ref: http://msdn.microsoft.com/en-us/library/ms415817.aspx

********************************************
Creating Custom Enterprise Search Web Parts in SharePoint Server 2007

With Enterprise Search in Microsoft Office SharePoint Server 2007, you can customize the look and functionality of Search Center pages and Web Parts from the browser. To make customizations that are not possible through the browser, you can create a custom Web Part that uses the Query object model to execute queries against the search component. This Office Visual How To article demonstrates creating a custom Enterprise Search Web Part in Office SharePoint Server 2007.

Ref: http://msdn.microsoft.com/en-us/library/bb871647.aspx

********************************************
Creating Custom Web Parts for Project Server 2007

A Web Part is a modular unit of information that has a single purpose and is a basic building block of a Web Part Page. Project Web Access uses many Microsoft Office Project Server 2007 Web Parts and can be easily extended with custom Web Parts. Web Parts in Windows SharePoint Services 3.0 improve upon earlier versions of Web Part technologies. You can use Windows SharePoint Services 2.0 Web Parts and ASP.NET 2.0 Web Parts. You can also use Web Parts in shared Web Part Page documents in a project workspace or team site. The shared documents are stored and managed on a computer running Windows SharePoint Services that is provisioned by Project Server. This Office Visual How To article shows the creation of a custom Web Part for Project Server 2007 that you can use to display the upcoming tasks for a specified project. The code presented in this article is based on the "No PWA Reference" Web Part sample that is included in the Microsoft Office Project 2007 SDK download.

Ref: http://msdn.microsoft.com/en-us/library/bb851478.aspx

********************************************

SharePoint Products and Technologies: Creating Custom Web Part Page Templates Sample http://www.microsoft.com/downloads/details.aspx?FamilyId=48B2C899-DB2C-4A93-AA95-AF4A37FA8AE8&displaylang=en

 ********************************************
SharePoint Server 2007 Sample: Web Part That Calls Excel Web Services

Ref: http://www.microsoft.com/downloads/details.aspx?familyid=2c5919e4-0757-4db1-9798-e0e4032f12a8&displaylang=en

********************************************

(3rd Party) SharePoint 2007 Flash Animation Web Part Please Note that 3rd Party Code/Tools are NOT supported by Microsoft.



Ref: http://www.codeproject.com/KB/sharepoint/MOSSFlashWebPart.aspx

 ********************************************

Wednesday, March 3, 2010

Top Navigation Bar & it's customization

Top Navigation Bar & it's customization

 


Customize the top link bar

Learn how navigation options differ between a publishing site and a non-publishing site
Before you start to customize the navigation for your site, you need to determine whether or not the publishing features available with Office SharePoint Server 2007 are enabled for the sites in your site collection (site collection: A set of Web sites on a virtual server that have the same owner and share administration settings. Each site collection contains a top-level Web site and can contain one or more subsites.). It is important to know whether or not your site is a publishing site because the navigation customization options for a publishing site are more extensive than those available for a non-publishing site.

Notes

If you configure your site to show subsites and pages, but your site is set up to display the global navigation (top link bar) and current navigation (Quick Launch) for its parent site, you will not see links to these subsites and pages in the navigation for your current site unless the navigation for the parent site is also configured to display subsites and pages.

If you are configuring navigation for a top-level site, and you want pages or subsites underneath the subsites of the top-level site to appear on drop-down menus from the top link bar, you need to configure the top level site to show subsites and pages, and you also need to configure the individual subsites to show their subsites and pages.

If you do not want all of the subsites or pages to display, you can hide pages and subsites individually after you have configured them to display. For more information, see Show or hide items on the top link bar.

Ref: http://office.microsoft.com/en-us/sharepointserver/HA102551931033.aspx

*******************************************

Customize the top link bar

The tabs on the top link bar automatically both list the home page and link to it. They also both list and link to the home page of any subsite under this site, but only if you created the subsite by using the browser and selected the Display this site on the top link bar of the parent site option.


You can modify the top link bar either in the browser (by clicking Site Settings and then going to the Top Link Bar page) or in Office SharePoint Designer 2007 (by using the following steps). Modifying the top link bar in Office SharePoint Designer 2007 is a more visual way of working because you can drag pages onto the link bar. Also, when you name a page in Navigation view, the page title that is shown in the browser window is automatically changed to the new name.

Open the site for which you want to modify the top link bar in Office SharePoint Designer 2007.

On the Site menu, click Navigation.

Navigation view opens to display a visual representation of the site. Link bars are represented by the boxes with globe symbols.


Ref: Get started with basic site customizations

http://office.microsoft.com/en-us/sharepointdesigner/HA101741431033.aspx

*******************************************

Roadmap for managing navigation for a SharePoint site

You can customize the navigation for individual Microsoft Office SharePoint Server 2007 sites or create a navigation structure that is shared across multiple sites in a site collection. How you choose to organize the navigational structure for your site depends on many factors such as the size of your site, and the needs of the people who will use it.

This roadmap is designed for individuals who are managing navigation for an Office SharePoint Server 2007 site but who are not IT professionals. If you are an IT professional, TechNet may better meet your needs.

Note To manage navigation for a SharePoint site, you must have the Full Control or Design permission level for the site. You have one of these permission levels if you can access the Sites Settings page for the site and you see the Navigation command under Look and Feel (on non-publishing sites, you will see the Quick Launch and Top link bar commands under Look and Feel instead of Navigation).

Ref: http://office.microsoft.com/en-us/sharepointserver/HA102487861033.aspx

*******************************************

Customizing the Navigation Areas

This programming task shows how to customize the top navigation area that is displayed on every page within a SharePoint site and the Quick Launch area that is displayed on home pages. The first example involves modifying the ONET.XML file of the site definition, while the second example involves modifying both ONET.XML and default.aspx.

Warning It is required that you create a custom site definition by copying an existing site definition, rather than modifying the original ONET.XML file installed with Windows SharePoint Services. Changes that you make to the originally installed file may be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next product version. For information on creating a custom site definition, see Creating a Site Definition from an Existing Definition. Modifying an originally installed ONET.XML file to customize the navigation areas of pages in already existing sites is not supported.

The NavBars element near the beginning of ONET.XML contains several NavBar elements, the first of which pertains to the top navigation area and is named SharePoint Top Navbar. All other NavBar elements contained within the NavBars element define the Quick Launch area of the home page.

To customize the top navigation area

Customize the top navigation area of future sites created through the site definition by adding a NavBarLink element to the first NavBar element within ONET.XML (in Local_Drive:\Microsoft Shared\Web Server Extensions\60\TEMPLATE\Locale_ID\SITE_DEFINITION\XML). You can add links to local files and pages within the Microsoft Windows SharePoint Services deployment or links to files and pages located elsewhere.

Ref: http://msdn.microsoft.com/en-us/library/dd587301(office.11).aspx

*******************************************

Windows SharePoint Services Default Master Pages

Windows SharePoint Services pages that end users can customize—list view pages, list form pages, and Web Part Pages—are content pages that contain the content to display. When a user requests a content page, it is merged with a master page to produce output that combines the layout of the master page with the content from the content page.

All content pages share the same page structure—the global breadcrumb, site title area, top navigation, page title area, and left navigation bar. In Windows SharePoint Services, this shared page structure is moved into a master page called default.master, which is used by all content pages, including the following:

default.aspx

AllItems.aspx, DispForm.aspx, NewForm.aspx, and EditForm.aspx: for all lists

Upload.aspx and Webfldr.aspx: for all document libraries

Any new content pages that are created in this site

At installation, default.master is located at Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\GLOBAL. As long as this master page is not customized, its page definition is cached on the front-end Web server and shared across sites. If the master page definition inside of default.master is subsequently edited for a particular Windows SharePoint Services site, an edited copy of the master page file is then stored in the content database.

The standard set of content pages all use the default master page and are initially located in the file system, in the same directory area as the rest of the template pages. For example, in the case of a SharePoint team site, default.aspx is stored at \Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\SiteTemplates\STS, while form pages such editform.aspx are stored in their respective \Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\Features folder. After a content page is customized, it is stored in the content database.

Ref: http://msdn.microsoft.com/en-us/library/ms467402.aspx

*******************************************

Customizing the Quick Launch menu: Adding fly-out menus to SharePoint navigation


Ref: http://blogs.msdn.com/sharepoint/archive/2007/04/26/customizing-the-quick-launch-menu-adding-fly-out-menus-to-sharepoint-navigation.aspx

*******************************************

Tuesday, March 2, 2010

IIS 6.0/7.0 Application Pool, Recycling & Log Tracing

IIS Application Pool
http://technet.microsoft.com/en-us/library/cc735247(WS.10).aspx

IIS Application Pool Recycling
http://technet.microsoft.com/en-us/library/cc735206(WS.10).aspx

IIS Process Recycling

http://msdn.microsoft.com/en-us/library/ms525803.aspx

Configuring Recycling Settings for an Application Pool (IIS 7)
http://technet.microsoft.com/en-us/library/cc753179(WS.10).aspx

Common Administrative Tasks (IIS 7)
http://technet.microsoft.com/en-us/library/cc771979(WS.10).aspx

How to enable logging in Internet Information Services (IIS 6.0)

http://support.microsoft.com/kb/313437

Enable Trace Logging for Failed Requests (IIS 7)
http://technet.microsoft.com/en-us/library/cc771979(WS.10).aspx

How to modify Application Pool Recycling events in IIS 6.0

http://support.microsoft.com/kb/332088

IIS Worker Process
http://technet.microsoft.com/en-us/library/cc735084(WS.10).aspx
 
IIS 6.0 does not serve unknown MIME types
http://support.microsoft.com/kb/326965
 
The IIS 6.0 Resource Kit Tools
http://support.microsoft.com/kb/840671