How-to force Profiles to use SQL Server 2000

S

Saber

I've not installed SQL Express and want to use SQL Server 2000 instead,
I want to use SQL Server address instead of App_Data folder.
web.config contains:
****************************************************
<anonymousIdentification enabled="true"/>
<profile>
<providers>
<add name="ProfileProvider2"
connectionStringName="admanagementConnectionString1"
applicationName="/"
type="System.Web.Profile.SqlProfileProvider" />
</providers>
<properties>
<add customProviderData="ProfileProvider2" name="UserIdd"
type="System.String" allowAnonymous="true"/>
</properties>
</profile>
*****************************************************
But it still wants to use SQL Express, it is a part of error:

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance
using.....
 
K

Ken Cox - Microsoft MVP

Are you getting the correct Provider? I don't see you using <clear />.

What does this show?

Protected Sub Page_Load _
(ByVal sender As Object, ByVal e As System.EventArgs)
For Each p As Provider.ProviderBase In ProfileManager.Providers
Response.Write(p.Name & ", " & p.GetType().ToString() & "<br
/>")
Response.Write(p.Description & "<br />")
Next
End Sub
 
S

Saber

Thanks Ken,
Here is the result of your code:
AspNetSqlProfileProvider, System.Web.Profile.SqlProfileProvider
SQL profile provider.
ProfileProvider2, System.Web.Profile.SqlProfileProvider
SQL profile provider.
Are you getting the correct Provider? I don't see you using <clear />.
How I do this?
 
K

Ken Cox - Microsoft MVP

You should be able to use the Web Site Administration Tool to change the
default provider. By default, the Web Site Administration Tool uses the
AspNetSqlProvider provider for all application features.


http://msdn2.microsoft.com/en-us/library/83y98ckk.aspx

Here's how to use <clear />

<profile defaultProvider="SqlProvider">
<providers>
<clear />
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="SqlServices"
applicationName="SampleApplication"
description="SqlProfileProvider for SampleApplication" />
</providers>

http://msdn2.microsoft.com/en-us/library/ms164644.aspx

Ken
 
S

Saber

Thanks Ken for your replies,
I fixed it by removing this line in machine.config:
<add name="LocalSqlServer" connectionString="data
source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
Instance=true" providerName="System.Data.SqlClient" />

And adding this line instead:
<add name="LocalSqlServer" connectionString="Data Source=sina;Initial
Catalog=admanagement;Integrated Security=True"
providerName="System.Data.SqlClient" />



Now I'm very happy :~)


Ken Cox - Microsoft MVP said:
You should be able to use the Web Site Administration Tool to change the
default provider. By default, the Web Site Administration Tool uses the
AspNetSqlProvider provider for all application features.


http://msdn2.microsoft.com/en-us/library/83y98ckk.aspx

Here's how to use <clear />

<profile defaultProvider="SqlProvider">
<providers>
<clear />
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="SqlServices"
applicationName="SampleApplication"
description="SqlProfileProvider for SampleApplication" />
</providers>

http://msdn2.microsoft.com/en-us/library/ms164644.aspx

Ken


Saber said:
Thanks Ken,
Here is the result of your code:
AspNetSqlProfileProvider, System.Web.Profile.SqlProfileProvider
SQL profile provider.
ProfileProvider2, System.Web.Profile.SqlProfileProvider
SQL profile provider.
Are you getting the correct Provider? I don't see you using <clear />.
How I do this?

Ken Cox - Microsoft MVP said:
Are you getting the correct Provider? I don't see you using <clear />.

What does this show?

Protected Sub Page_Load _
(ByVal sender As Object, ByVal e As System.EventArgs)
For Each p As Provider.ProviderBase In ProfileManager.Providers
Response.Write(p.Name & ", " & p.GetType().ToString() & "<br
/>")
Response.Write(p.Description & "<br />")
Next
End Sub


"Saber" <saber[.AT.]oxin.ir> wrote in message
I've not installed SQL Express and want to use SQL Server 2000 instead,
I want to use SQL Server address instead of App_Data folder.
web.config contains:
****************************************************
<anonymousIdentification enabled="true"/>
<profile>
<providers>
<add name="ProfileProvider2"
connectionStringName="admanagementConnectionString1"
applicationName="/"
type="System.Web.Profile.SqlProfileProvider" />
</providers>
<properties>
<add customProviderData="ProfileProvider2" name="UserIdd"
type="System.String" allowAnonymous="true"/>
</properties>
</profile>
*****************************************************
But it still wants to use SQL Express, it is a part of error:

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance
using.....
 
K

Ken Cox - Microsoft MVP

Thanks for reporting back!

Saber said:
Thanks Ken for your replies,
I fixed it by removing this line in machine.config:
<add name="LocalSqlServer" connectionString="data
source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
Instance=true" providerName="System.Data.SqlClient" />

And adding this line instead:
<add name="LocalSqlServer" connectionString="Data Source=sina;Initial
Catalog=admanagement;Integrated Security=True"
providerName="System.Data.SqlClient" />



Now I'm very happy :~)


Ken Cox - Microsoft MVP said:
You should be able to use the Web Site Administration Tool to change the
default provider. By default, the Web Site Administration Tool uses the
AspNetSqlProvider provider for all application features.


http://msdn2.microsoft.com/en-us/library/83y98ckk.aspx

Here's how to use <clear />

<profile defaultProvider="SqlProvider">
<providers>
<clear />
<add name="SqlProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="SqlServices"
applicationName="SampleApplication"
description="SqlProfileProvider for SampleApplication" />
</providers>

http://msdn2.microsoft.com/en-us/library/ms164644.aspx

Ken


Saber said:
Thanks Ken,
Here is the result of your code:
AspNetSqlProfileProvider, System.Web.Profile.SqlProfileProvider
SQL profile provider.
ProfileProvider2, System.Web.Profile.SqlProfileProvider
SQL profile provider.

Are you getting the correct Provider? I don't see you using <clear />.
How I do this?

Are you getting the correct Provider? I don't see you using <clear />.

What does this show?

Protected Sub Page_Load _
(ByVal sender As Object, ByVal e As System.EventArgs)
For Each p As Provider.ProviderBase In ProfileManager.Providers
Response.Write(p.Name & ", " & p.GetType().ToString() & "<br
/>")
Response.Write(p.Description & "<br />")
Next
End Sub


"Saber" <saber[.AT.]oxin.ir> wrote in message
I've not installed SQL Express and want to use SQL Server 2000
instead,
I want to use SQL Server address instead of App_Data folder.
web.config contains:
****************************************************
<anonymousIdentification enabled="true"/>
<profile>
<providers>
<add name="ProfileProvider2"
connectionStringName="admanagementConnectionString1"
applicationName="/"
type="System.Web.Profile.SqlProfileProvider" />
</providers>
<properties>
<add customProviderData="ProfileProvider2" name="UserIdd"
type="System.String" allowAnonymous="true"/>
</properties>
</profile>
*****************************************************
But it still wants to use SQL Express, it is a part of error:

SQLExpress database file auto-creation error:

The connection string specifies a local Sql Server Express instance
using.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Profiles 0
Profiles problem 0
Profiles 1
How to use multiple profiles 1
Profiles & Membership 0
Profiles 0
ASP.NET v2.0 login control issue with SQL Server 2000 5
Profiles - extend property attributes? 0

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top