Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How-to force Profiles to use SQL Server 2000

Reply
Thread Tools

How-to force Profiles to use SQL Server 2000

 
 
Saber
Guest
Posts: n/a
 
      02-11-2006
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="admanagementConnectionString 1"
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.....


 
Reply With Quote
 
 
 
 
Ken Cox - Microsoft MVP
Guest
Posts: n/a
 
      02-11-2006
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
news:...
> 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="admanagementConnectionString 1"
> 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.....
>
>



 
Reply With Quote
 
 
 
 
Saber
Guest
Posts: n/a
 
      02-11-2006
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" <> wrote in message
news:%23oD%...
> 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
> news:...
>> 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="admanagementConnectionString 1"
>> 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.....
>>
>>

>
>



 
Reply With Quote
 
Ken Cox - Microsoft MVP
Guest
Posts: n/a
 
      02-11-2006
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" <saber[.AT.]oxin.ir> wrote in message
news:...
> 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" <> wrote in message
> news:%23oD%...
>> 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
>> news:...
>>> 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="admanagementConnectionString 1"
>>> 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.....
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Saber
Guest
Posts: n/a
 
      02-11-2006
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|aspn etdb.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" <> wrote in message
news:%...
> 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" <saber[.AT.]oxin.ir> wrote in message
> news:...
>> 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" <> wrote in message
>> news:%23oD%...
>>> 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
>>> news:...
>>>> 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="admanagementConnectionString 1"
>>>> 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.....
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Ken Cox - Microsoft MVP
Guest
Posts: n/a
 
      02-12-2006
Thanks for reporting back!

"Saber" <saber[.AT.]oxin.ir> wrote in message
news:...
> 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|aspn etdb.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" <> wrote in message
> news:%...
>> 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" <saber[.AT.]oxin.ir> wrote in message
>> news:...
>>> 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" <> wrote in message
>>> news:%23oD%...
>>>> 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
>>>> news:...
>>>>> 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="admanagementConnectionString 1"
>>>>> 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.....
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nike air force one, air force 1, air force one low cut, air force one salewholeta@163.com Digital Photography 3 12-31-2008 04:29 PM
Nike Air Force Ones,Air Force One Air Force One-1 lky52193@gmail.com Computer Support 0 01-17-2008 04:40 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:46 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:34 PM
Microsoft Exchange 2000 Server OR Microsoft SQL Server 2000 Sam MCSE 11 06-03-2005 08:29 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57