ActiveSkill Tutorial - ASPNETDB.MDF

3 posts, 0 answers
  1. Brad
    Brad avatar
    93 posts
    Member since:
    Jan 2011

    Posted 24 Jan 2011 Link to this post

    I do have a problem with this tutorial after all.

    The steps in the ActiveSkill tutorial ask you to create a SQL db with .sql files provided in the courseware.

    This all goes to plan.

    I then modified my ActiveSkillUI projects web.config, adding a connection string and a couple of role/membership providers.

    Those 3 things look like this.

            <add name="ActiveSkillConnectionString" connectionString="Data Source=NETDEV\SqlExpress;Initial Catalog=ActiveSkill;Integrated Security=True;User Id=ActiveSkillUser;Password=a0biozasu1" providerName="System.Data.SqlClient"/>
            <roleManager enabled="true">
                    <add    connectionStringName="ActiveSkillConnectionString"
                            type="System.Web.Security.SqlRoleProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
                    <add    name="AspNetSqlMembershipProvider"
                            type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    etc etc...

    Note I have a user login created for this database. That login is confirmed and working.

    My problem is that despite the efforts above, the WSAT ASP.NET Configuration app, keeps creating and using an ASPNETDB.MDF db that it is annoyingly creating in my projects  App_Data directory.

    In an attempt to rid myself of this pointless database I tracked a reference to it back in the machine.config file.

    In there it looked like this.

    <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>

    So, as a test I removed this line and put my own connectionsting in there.

    However running the WSAT app again, it gets the following error.

    An error was encountered. Please return to the previous page and try again.

    The following message may help in diagnosing the problem: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. (C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 152) at System.Web. etc etc

    As a final check (before posting this thread) is I searched my project for any reference to the connection string LocalSqlServer and found it does not exist.

    This it a mystery to me. Anyone have some tips?



  2. Veronica
    Veronica avatar
    1213 posts

    Posted 25 Jan 2011 Link to this post

    Hi Brad,

    By default the ASP.NET Web Administration Tool is creating the roles and users in database called aspnetdb. The connection string in machine.config file lets the Visual Studio to add this database in the App_Data folder. To be able to make the tool to create the needed tables in the already created database ActiveSkill - please run the ASP.NET SQL Server Registration tool. The aspnet_regsql.exe file is located in the C:\WINDOWS\Microsoft.NET\Framework\<versionNumber>\aspnet_regsql.exe folder on your Web server. Follow the wizard and select your database ActiveSkill instead of letting the default as shown in the picture:

    Please let me know if this was helpful. 

    Best wishes,
    Veronica Milcheva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Brad
    Brad avatar
    93 posts
    Member since:
    Jan 2011

    Posted 26 Jan 2011 Link to this post

    <sound of penny dropping>

    That did the trick. Thanks Veronica

Back to Top