chickflickssuck 0 Newbie Poster

Hello all,

I have sql server 2005 and sql server 2000 installed on my PC. Our server only has sql server 2000. In my test environment (local pc) i need to configure my database (and/or) web.config to use sql server 2000 instead of 2005 for the profile provider.

I have (along with a co-worker) spent the last 5 hours reading articles and trying numerous ideas, but to no avail. After my presentation (which will take place at my desk because i cant get asp.net profiles to work on our server) i plan on removing 2005 from my local pc so that there is a little less confusion.

I have placed the following code in my Web.Config

<remove key="LocalSqlServer"/>  
<add key="LocalSqlServer" value="Data Source=localhost;Initial Catalog=appservicesdb;Integrated Security=True"/>  
  
  
<profile defaultProvider="MyProfileProvider">  
      <providers>  
        <add name="MyProfileProvider"  
             connectionStringName="LocalSqlServer"  
                applicationName="/"  
                type="System.Web.Profile.SqlProfileProvider" />  
      </providers>  

<remove key="LocalSqlServer"/>
<add key="LocalSqlServer" value="Data Source=localhost;Initial Catalog=appservicesdb;Integrated Security=True"/>


<profile defaultProvider="MyProfileProvider">
      <providers>
        <add name="MyProfileProvider"
             connectionStringName="LocalSqlServer"
                applicationName="/"
                type="System.Web.Profile.SqlProfileProvider" />
      </providers>

But i cant figure out how to force the connection string, to point to my new database file. In my IIS / under the ASP.net section, and then under the 'General' tab, in the Connection String Manager section, i have the following:

data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true

I have used the Sql Setup tool located at: C:\Windows\Microsoft.NET\Framework\aspnet_regsql . After I run my application, then view the database table aspnetdb, it still contains no user information, so it is not being accessed /or/ updated with any values... which tells me that the application is still pointing to my sql server 2005 (or) express.. instead of sql server 2000.

At one point, I felt we were very close to the solution, when i would run my application it would throw the error message:

"System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database 'master'. Could not attach database" (followed by about 10 lines of meaningly message). I then learned that sql server 2000 uses the "Network Service" login to access the database, as opposed to "aspnet" or other various logons per other sql versions. But at this point I ran into the issue of creating a user (and accompanying role) for this "Networks Service" login, so it could have access rights... I did however go into the folder that the database resides under and granted all usergroups full access to the file.

anyone got an answer? it would be much appreciated :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.