locked
Using the starter kit w/out access to .MDF files RRS feed

  • Question

  • User-473698802 posted
    Dear friends,

    I am trying to run a club website starter kit-based site on my webhost, which uses SQL 2000. I have been able to get everything working except for the login. The reason is because the corresponding configuration tags refer explicitly to the .MDF, but I don't have explicit access to it on my webhost:

    <Parameter AllowDbNull="False" AutogeneratedName="id" ColumnName="memberid" DataSourceName="[/path/to/.mdf].[tableowner].MemberInfo" ........... >

    I do, however, have access to a .DSN file pointing to the database. Is it valid to use a DSN instead of the path to the MDF, and if so what is the syntax?

    Thanks!!
    Dirk
    Friday, January 13, 2006 1:02 PM

All replies

  • User1416329745 posted

    Try these two links for everything you need to get it going with SQL Server 2000, the second link is part two of a two part walkthrough for the club starter kit.   Hope this helps.

    http://www.microsoft.com/downloads/details.aspx?FamilyId=0DD83A11-6980-4951-A192-DA6EACC6A19E&displaylang=en

    http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/extendclubwebsitesk.asp

    Friday, January 13, 2006 1:22 PM
  • User-473698802 posted
    Thanks for your reply. I've been through this documentation and have suceeded 95% of the way, the site loads and talks to the database fine until you try and login:

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    When I reload, the call stack shrinks a bit and I get the same error.

    I believe the problem is with this section of App_Code/DataSet.xsd, which is not mentioned in any documentation I've yet encountered. Look at the portion in red:

                <Sources>
                  <DbSource ConnectionRef="ClubSiteDB (Web.config)" DbObjectName="dbo.MemberInfo" DbObjectType="Table" EnableWebMethods="False" GenerateMethods="Get" GeneratePagingMethods="False" GenerateShortCommands="True" GeneratorGetMethodName="GetMember" GetMethodName="GetMember" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetMember" UserSourceName="GetMember1">
                    <SelectCommand>
                      <DbCommand CommandType="Text" ModifiedByUser="True">
                        <CommandText>SELECT DATALENGTH(avatar) AS AvatarSize, address, firstname, lastname, memberid, phone FROM MemberInfo WHERE (memberid = @id)</CommandText>
                        <Parameters>
                          <Parameter AllowDbNull="False" AutogeneratedName="id" ColumnName="memberid" DataSourceName="[D:\Documents and Settings\samsp\Desktop\clubsite project\Club site\App_Data\clubsite.mdf].dbo.MemberInfo" DataTypeServer="uniqueidentifier" DbType="Guid" Direction="Input" ParameterName="@id" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="16" SourceColumn="memberid" SourceColumnNullMapping="False" SourceVersion="Current">
                          </Parameter>
                        </Parameters>
                      </DbCommand>
                    </SelectCommand>
                  </DbSource>
                </Sources>

    There is a similar reference a little further down. This is the only configuration code that I don't know how to adapt, because I don't have direct access to the .mdf file. Am I correct in thinking that this makes my situation peculiar and that I need to find a workaround (i.e., dsn), or am I barking up the wrong tree here?

    Any help would be appreciated.

    Thanks!
    Dirk
    Friday, January 13, 2006 2:16 PM
  • User1416329745 posted

    There is a work around at the end of this long thread so read all the posts by the users on this thread.  The reason is in SQL Server 2000 you can combine the two databases into one. Hope this helps.

    http://forums.asp.net/2/1074476/ShowPost.aspx#1074476

    Friday, January 13, 2006 3:28 PM
  • User-473698802 posted
    This is helpful, however I've hit another stumbling stone. The bad news is that it seems my host's sql server instance is behind some kind of secure connection and thus I can not direct aspnet_regsql.exe to it in order to allow me to create the necessary users and roles.

    The good news is that the one database my host has given me seems to already be set up for application services. It contains tables like aspnet_Roles and aspnet_UsersInRoles.

    If I had a SQL script to create the users and roles I could run it.

    Any thoughts?
    Dirk
    Friday, January 13, 2006 5:15 PM
  • User1052258516 posted

    This is helpful, however I've hit another stumbling stone. The bad news is that it seems my host's sql server instance is behind some kind of secure connection and thus I can not direct aspnet_regsql.exe to it in order to allow me to create the necessary users and roles.

    The good news is that the one database my host has given me seems to already be set up for application services. It contains tables like aspnet_Roles and aspnet_UsersInRoles.

    If I had a SQL script to create the users and roles I could run it.

    Any thoughts?
    Dirk

    http://vyaskn.tripod.com/code/generate_inserts_2005.txt

    This script will generate a stored procedure that you can use to generate all the inserts for the data in the supplied tables.  To execute it and get all of your data use the following syntax below.  this will create a set of results that can be cut and paste into a new query window and run.

    sp_generate_inserts 'aspnet_Applications', @include_timestamp = 1

    go

    sp_generate_inserts 'aspnet_Users', @include_timestamp = 1

    go

    sp_generate_inserts 'aspnet_Membership', @include_timestamp = 1

    go

    sp_generate_inserts 'aspnet_Roles', @include_timestamp = 1

    go

    sp_generate_inserts 'aspnet_UsersInRoles', @include_timestamp = 1

    go

    - Will

    Sunday, January 15, 2006 10:47 PM