Oracle 5.0 Reference Manual page 1952

Table of Contents

Advertisement

<providers>
<add name="MySqlSessionStateStore" type="MySql.Web.SessionState.MySqlSessionStateStore, MySql.Web, Vers
</providers>
</sessionState>
The SessionState Provider uses the
set the provider as the default. A typical
<system.web>
<membership defaultProvider="MySQLMembershipProvider" />
<roleManager defaultProvider="MySQLRoleProvider" />
<profile defaultProvider="MySQLProfileProvider" />
<sessionState customProvider="MySqlSessionStateStore" />
<compilation debug="false">
...
This sets the MySQL Providers as the defaults to be used in this web application.
The providers are implemented in the file
Connector/Net installation folder. There is no need to run any type of SQL script to set up the database
schema, as the providers create and maintain the proper schema automatically.
Using The Providers
The easiest way to start using the providers is to use the ASP.NET configuration tool that is available
on the Solution Explorer toolbar when you have a website project loaded.
In the web pages that open, you can select the MySQL membership and roles providers by picking a
custom provider for each area.
When the provider is installed, it creates a dummy connection string named LocalMySqlServer.
Although this has to be done so that the provider will work in the ASP.NET configuration tool, you
override this connection string in your
connection string and then adding in the proper one, as shown in the following example:
<connectionStrings>
<remove name="LocalMySqlServer"/>
<add name="LocalMySqlServer" connectionString="server=xxx;uid=xxx;pwd=xxx;database=xxx;"/>
</connectionStrings>
Note the database to connect to must be specified.
Rather than manually editing configuration files, consider using the MySQL Website Configuration tool
to configure your desired provider setup. From MySQL Connector/Net 6.1.1 onwards, all providers
can be selected and configured from this wizard. The tool modifies your
desired configuration. A tutorial on doing this is available in the following section
"MySQL Website Configuration
A tutorial demonstrating how to use the Membership and Role Providers can be found in the following
section
Section 20.2.4.2, "Tutorial: MySQL Connector/Net ASP.NET Membership and Role
Deployment
To use the providers on a production server, distribute the
assemblies, and either register them in the remote systems Global Assembly Cache or keep them in
your application's
20.2.5.19. Working with Partial Trust / Medium Trust
.NET applications operate under a given trust level. Normal desktop applications operate under full
trust, while web applications that are hosted in shared environments are normally run under the partial
trust level (also known as "medium trust"). Some hosting providers host shared applications in their
own app pools and allow the application to run under full trust, but this configuration is relatively rare.
Connector/Net Programming
customProvider
web.config
mysql.web.dll
web.config
Tool".
directory.
bin/
attribute, rather than defaultProvider, to
file might contain:
and this file can be found in your MySQL
file. You do this by first removing the dummy
MySql.Data
1932
file to the
website.config
Section 20.2.3.12,
Provider".
and the
MySql.Web

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents