ASP.NET 2.0 Profile Database

Discussion in 'ASP.NET 2.0' started by mdanielski, Jul 31, 2005.

  1. Does anyone know what the options are for setting up the proper database connection strings for using ASP.NET 2.0 Profile Managed Providers? Since we obviously don't have access to the machine.config file, can these settings be set in the web.config fie of our site so it properly points to the DiscountASP.NET hosted database? I have set up the providers to all use the AspNetSQLProvider for my local development machine, but when I try to go to a page that uses the Profile data, it bombs with a timeout error... presdumabley because it is looking for a SQL Server name that I specified in my machien.config file that doesn't exist on the hosted server.

    Thanks in advance,
    Mike
     
  2. Nevermind...

    Here is the synbtax to override the machine.config fie with a corresponding web.config file entry (for the connection string in this case):

    <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Password=caseymoe;Persist Security Info=True;User ID=DB_167318_sitternet_user;Initial Catalog=DB_167318_sitternet;Data Source=mssql02" providerName="System.Data.SqlClient"/>
    </connectionStrings>
     
  3. Hi,

    you're right its working to point on the right database, but the tables, views and stored proc won't be create automaticly.... [​IMG]

    Do you have an idea to create them easily?? Any tips will be appreciated!!

    Thanks!
     
  4. Hi,

    Yes, there is a script for creating the tables, views and procuedres, etc. I haven't been anble to recall exactly where I found them, but it is a single script and I ewither located in the MSDN for VS.NET 2005 or the Microsoft web site. If I find it I will post it back here.

    Mike
     
  5. Thanks Mike, I found it.

    It's a wizard located on our hard drive under "\WINDOWS\Microsoft.NET\Framework\[version]\aspnet_regsql.exe".
     

Share This Page