By default, Web Parts uses the SQL 2005 Express provider for data storage.
To use SQL Server 2000 or SQL Server 2005 (Non-Express), you need to do the following:
1. Use the aspnet_regsql.exe tool located in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\ to prepare SQL Server.
Basically, it will add the 'aspnetdb' database to your SQL Instance.
2. In your Web.config, add the following:
<connectionStrings>
<add name="ConnectionString"
connectionString="Data Source=your_server_name;
Initial Catalog=aspnetdb;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
.
.
<webParts>
<personalization defaultProvider="SqlPersonalizationProvider">
<providers>
<add name="SqlPersonalizationProvider"
type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider"
connectionStringName="ConnectionString" applicationName="/" />
</providers>
<authorization>
<deny users="*" verbs="enterSharedScope" />
<allow users="*" verbs="modifyState" />
</authorization>
</personalization>
</webParts>
</system.web>That's it...just create a new Web Application and start adding in Web Parts.
Comments
|
On
1/8/2010
ramesh
said:
I am getting following error:
On
4/16/2006
Tim Tullow
said:
Thanks...I couldn't figure this out.
|
Leave a Comment