1、先在c:\Windosws\Microsoft.NET\Framework\v2.0.50215下,运行aspnet_regsql,之后按照提示做好SQL2000的配置,最后会产生一个叫aspnetdb的数据库。
2、配置web.config 文件(以下是我一个工程的web.config文件,大家修改为自己的IP、用户名、密码)
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="MySqlProviderConnection" connectionString="server=172.22.48.22;integrated security = true;Initial Catalog=aspnetdb;User ID=sa;Password=123456" />
<add name="Lwga2ConnectionString" connectionString="Data Source=172.22.48.22;Initial Catalog=abcd;User ID=sa;Password=123456"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<membership>
<providers>
<add connectionStringName="MySqlProviderConnection" name="MySqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</membership>
<profile>
<providers>
<add name="MySqlProfileProvider" connectionStringName="MySqlProviderConnection" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</profile>
<roleManager enabled="true">
<providers>
<add connectionStringName="MySqlProviderConnection" applicationName="/"
name="MySqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add applicationName="/" name="MyWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
<compilation debug="false" />
<authentication mode="Forms" />
</system.web>
</configuration>