aspnet_regsql.exe

Discussion in 'ASP.NET 2.0' started by jekain314, Jan 17, 2008.

  1. can someone explain whataspnet_regsql.exe does?

    I am aware that it seems to be required if you plan to add users/roles to the database functions. I am running asp.net 3.5 and am using the Visual Studio 2008 test software.

    When you use the VS2008 security manager console, it adds a database called ASPNETDB.MDF. In my case I already had a database called database.mdf where i put all my app-specific tables.

    The DASP knowledgebase says to run aspnet_regsql.exe to enable the use of the user/roles.

    The reference text i am using (ASP.NET 3.5 in C#) seems to suggest that aspnet_regsql.exe merges database.mdf and ASPNETDB.MDF schemas. But I cant seem to see this physicallyon my local machine. Are the two databases actually merged with tables from ASPNETDB.MDF added to database.mdf? Can I replicate this behavior on my local machine before migrating to DASP?

    The confusion seems to be that the databases will reside on the web host site (DASP) and my local machine. My local machine seemed to work fine but when I ranaspnet_regsql on the uploaded database.mdf, now even my local web site doesnt work right. (My masterpage.aspx isnt recognized correctly)

    My tactic now is to rebuild the local web site so it works and then try everything over again.

    It would seem that this is a very generic problem.

    (1) You have a working developmental local web site with database.mdf and ASPNETDB.MDF
    (2) You register the database.mdf with DASP
    (3) You use the local VS2008 web copy console to copy the web site to DASP
    (4) Run the aspnet_regsql.exe per the knowledgebase

    Seems my process went awry somewhere!!

    ---Jim
     
  2. The SQL tool is documented here:
    http://msdn2.microsoft.com/en-us/library/ms229862(VS.80).aspx

    DASP has an option in the Control Panel for SQL Server 2005 to mount a DB.

    I still recommend the use of the SQL Server management tools if you have them.
     

Share This Page