How-to force Profiles to use SQL Server 2000

Discussion in 'ASP .Net' started by Saber, Feb 11, 2006.

  1. Saber

    Saber Guest

    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.....
     
    Saber, Feb 11, 2006
    #1
    1. Advertising

  2. 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="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.....
    >
    >
     
    Ken Cox - Microsoft MVP, Feb 11, 2006
    #2
    1. Advertising

  3. Saber

    Saber Guest

    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="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.....
    >>
    >>

    >
    >
     
    Saber, Feb 11, 2006
    #3
  4. 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="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.....
    >>>
    >>>

    >>
    >>

    >
    >
     
    Ken Cox - Microsoft MVP, Feb 11, 2006
    #4
  5. Saber

    Saber Guest

    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" <> 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="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.....
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Saber, Feb 11, 2006
    #5
  6. 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|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" <> 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="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.....
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Ken Cox - Microsoft MVP, Feb 12, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Z2F1cmF2?=

    Uploading Data From MS Acess 2000 ti SQL server 2000

    =?Utf-8?B?Z2F1cmF2?=, Jan 9, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    816
    Mary Chipman [MSFT]
    Jan 9, 2006
  2. Daves
    Replies:
    1
    Views:
    382
  3. C Did
    Replies:
    3
    Views:
    3,971
    Chris Lithgow
    Jun 20, 2006
  4. Grey Alien

    SQL Server 2000 vs SQL Server Express

    Grey Alien, Jul 8, 2007, in forum: ASP .Net
    Replies:
    6
    Views:
    497
    Grey Alien
    Jul 9, 2007
  5. Denis

    Access 2000 or SQL Server 2000

    Denis, Jan 25, 2004, in forum: ASP General
    Replies:
    1
    Views:
    210
    Nicole Calinoiu
    Jan 25, 2004
Loading...

Share This Page