-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Swapnil_B1
Message 1 in Discussion
Folks,
Today we will discuss on the Provider Model of ASP.NET 2.0 in
detail and we will discuss about each provider and its functionalities in my
next articles.
Provider Model in ASP.NET 2.0
Provider is a software module that provides a Uniform interface
between a service and data source. It acts as the intermediary between the Data
source and the ASP.NET services. Providers abstract physical storage media, in
much the same way that device drivers abstract physical hardware devices.
ASP.NET 2.0 includes a number of services that store state in
databases and other storage media. For example, the session state service
manages per-user session state by storing it in-process (in memory in the
application domain of the host application), in memory in an external process
(the "state server process"), or in a Microsoft SQL Server database, while the
membership service stores user names, passwords, and other data in Microsoft
SQL Server databases or Active Directory. For the majority of applications, the
built-in storage options are sufficient. However, the need sometimes arises to
store state in other media such as Oracle databases, DB2 databases, Microsoft
SQL Server databases with custom schemas, XML files, or even data sources
front-ended by Web services. In ASP.NET 1.x, developers who wished to store
state in alternative storage media were faced with the daunting prospect of
rewriting large portions of ASP.NET. ASP.NET 2.0, by contrast, introduces
extreme flexibility to state storage. ASP.NET 2.0 services that manage state do
not interact directly with storage media; instead, they use providers as
intermediaries.
The Provider Model is as follows
ASP.NET Applications
ASP.NET Services (State management Service, Profile, Membership services etc)
Providers (SQLMembership, SQLProfileProvider, SiteMapProvider etc)
Data Source (SQL, XML, Oracle)
Built in ASP.NET 2.0 Providers
1) Membership
2) Role Management
3) Sitemap
4) Profile
5) State
6) Web Events
7) Web Parts
8) Protected Configuration
In Addition to above mentioned Providers users can also create custom Providers
by inheriting Provider Base class. System.Configuration.Provider.ProviderBase
Providers Registration and Configuration
You can register Provider in Web.Config file in <providers>
element in Configuration Section. <add> element within <provider> element
register Provider and make them available for the use. <add> elements support a
common set of configuration attributes such as name, type, and description,
plus provider-specific configuration attributes that are unique to each
provider
<configuration>
<system.web>
<membership>
<providers>
<add name="AspNetSqlMembershipProvider"
type="[Type name]"
description="SQL Server membership provider"
connectionStringName="LocalSqlServer" />
</providers>
</membership>
</system.web>
</configuration>
Once registered, a provider is usually designated as the default (active)
provider using the defaultProvider attribute of the corresponding configuration
element. For example, the following <membership> element designates
SqlMembershipProvider as the default provider for the membership service:
<membership defaultProvider="AspNetSqlMembershipProvider">
<providers> </providers>
</membership>
The defaultProvider attribute identifies by logical name (rather than type
name) a provider registered in <providers>. Note that ASP.NET is not entirely
consistent in its use of the defaultProvider attribute. For example, the
<sessionState> element uses a customProvider attribute to designate the default
session state provider.
Any number of providers may be registered for a given service, but only one can
be the default. All providers registered for a given service may be enumerated
at run-time using the service's Providers property (for example,
Membership.Providers).
Swapnil (Swaps)
http://swapsnet.spaces.live.com/
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]