create aspnetdb from scratch

Discussion in 'ASP .Net' started by Mr. X., Oct 28, 2008.

  1. Mr. X.

    Mr. X. Guest

    Hello.
    How can I create aspnetdb from scratch ?
    (I want a script that create all table, views, etc... on that database).

    Thanks :)
    Mr. X., Oct 28, 2008
    #1
    1. Advertising

  2. Mr. X.

    sloan Guest

    This link:
    http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!160.entry
    has the link to the cmd line tool to create a fresh / blank db. (scottgu
    link)
    My addition is a "data transferer"




    "Mr. X." <no_spam_please@nospam_please.com> wrote in message
    news:...
    > Hello.
    > How can I create aspnetdb from scratch ?
    > (I want a script that create all table, views, etc... on that database).
    >
    > Thanks :)
    >
    sloan, Oct 28, 2008
    #2
    1. Advertising

  3. Mr. X.

    Mr. X. Guest

    I need especially the aspnetdb database's script
    In that site
    (http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!160.entry
    ) for creating all the elements (tables, views, etc...),
    that I should copy & paste it into Query Analyser on my site.

    Thanks :)
    Mr. X., Oct 28, 2008
    #3
  4. Mr. X.

    bruce barker Guest

    build the database once, then use enterprise manager or a database project to
    generate the scripts


    -- bruce (sqlwork.com)


    "Mr. X." wrote:

    > I need especially the aspnetdb database's script
    > In that site
    > (http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!160.entry
    > ) for creating all the elements (tables, views, etc...),
    > that I should copy & paste it into Query Analyser on my site.
    >
    > Thanks :)
    >
    >
    >
    bruce barker, Oct 28, 2008
    #4
  5. Mr. X.

    Mr. X. Guest

    If the DB was just on my computer, I could do it long time ago,
    but the database, which is aspnetdb - a specific database, that for some
    unknown reason, Microsoft enforce someone who deploy his site to have,
    should be on the hosting site only SQL-Server 2005.

    I try some ways to create a database :
    founded on http://www.4shared.com/file/59591680/a5b7abdf/ASPNETDB_TMP.html,
    .... then by Microsoft SQL Server Management I created a "bak" file,
    but the hosting provider tell me everything O.K, except I should send him a
    SQL-Server 2005.

    I don't know how to check the version of SQL-Server 2005 (of the link
    above),
    but if I found a link as the previous one (for SQL-Server 2005), it would be
    fine.

    I just need a file : bakup file or script file, that I can put on the
    hosting server, without any problems.
    I am searching that file (.bak or .sql of SQL-Server 2005 version), but I
    didn't find yet.
    I don't know why just putting a file on the internet, and save efforts
    creating it, since this is a standard file (aspnetdb), that always should be
    when deploying my site.

    If you have a link to that file (bak or sql for SQL-Server 2005 version), it
    would be great.

    Please, help.

    Thanks :)
    Mr. X., Oct 29, 2008
    #5
  6. Mr. X.

    Mr. X. Guest

    Hi.

    First time after deployment on VS 2008.
    (Just create the login wizard in VS 2008 - VB, and deploy).

    The I got the following error :
    ======================

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Failed to generate a user instance of SQL Server due to failure in
    retrieving the user's local application data path. Please make sure the user
    has a local user profile on the computer. The connection will be closed.
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Failed to generate a
    user instance of SQL Server due to failure in retrieving the user's local
    application data path. Please make sure the user has a local user profile on
    the computer. The connection will be closed.

    Source Error:

    An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.


    ******
    ******
    After looking in google (I may be wrong, but too much sites, telling the
    same),
    I see that the above is related to sqlnetdb.mdf, and I should create one.
    Yet, I don't use any database.

    Here is the web.config, what the deployment enviormnet by VS 2008 put
    automatically :

    <?xml version="1.0"?>
    <configuration>
    <appSettings/>
    <system.web>
    <!--
    Set compilation debug="true" to insert debugging
    symbols into the compiled page. Because this
    affects performance, set this value to true only
    during development.

    Visual Basic options:
    Set strict="true" to disallow all data type conversions
    where data loss can occur.
    Set explicit="true" to force declaration of all variables.
    -->
    <customErrors mode="Off"/>
    <compilation debug="true" strict="false" explicit="true">
    </compilation>
    <pages>
    <namespaces>
    <clear/>
    <add namespace="System"/>
    <add namespace="System.Collections"/>
    <add namespace="System.Collections.Generic"/>
    <add namespace="System.Collections.Specialized"/>
    <add namespace="System.Configuration"/>
    <add namespace="System.Text"/>
    <add namespace="System.Text.RegularExpressions"/>
    <add namespace="System.Linq"/>
    <add namespace="System.Xml.Linq"/>
    <add namespace="System.Web"/>
    <add namespace="System.Web.Caching"/>
    <add namespace="System.Web.SessionState"/>
    <add namespace="System.Web.Security"/>
    <add namespace="System.Web.Profile"/>
    <add namespace="System.Web.UI"/>
    <add namespace="System.Web.UI.WebControls"/>
    <add namespace="System.Web.UI.WebControls.WebParts"/>
    <add namespace="System.Web.UI.HtmlControls"/>
    </namespaces>
    </pages>
    <!--
    The <authentication> section enables configuration
    of the security authentication mode used by
    ASP.NET to identify an incoming user.
    -->
    <authentication mode="Windows"/>
    <!--
    The <customErrors> section enables configuration
    of what to do if/when an unhandled error occurs
    during the execution of a request. Specifically,
    it enables developers to configure html error pages
    to be displayed in place of a error stack trace.

    <customErrors mode="RemoteOnly"
    defaultRedirect="GenericErrorPage.htm">
    <error statusCode="403" redirect="NoAccess.htm" />
    <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->
    </system.web>
    <system.codedom>
    </system.codedom>
    <!--
    The system.webServer section is required for running ASP.NET AJAX
    under Internet
    Information Services 7.0. It is not necessary for previous version
    of IIS.
    -->
    <system.webServer>
    </system.webServer>
    </configuration>

    Second : I put the file on the link I gave
    ==============================
    http://www.4shared.com/file/59591680/a5b7abdf/ASPNETDB_TMP.html
    and also the ASPNETDB_TMP_log.LDF

    What I see, that this database is just using to record and trace members (or
    something like that).

    I have tried to add a reference in web.config like this :
    ....
    <configuration>
    <connectionStrings>
    <remove name="LocalSqlServer" />

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

    Still I got the same error.

    The hosting company supports sqlexpress & also sql-server 2005, and insist
    to send them a ".bak" or ".sql" version
    of SQL-Server-2005.

    Neighter of them are right, since they are not SQL-Server-2005 version.

    I would be glade, whether I not need now the ASPNETDB.MDF (for some reason,
    I understood that aspnetdb.mdf is a database that must be on server site,
    when doing deployment, and also app_data folder).

    Look for any solution.

    Thanks :)
    Mr. X., Oct 29, 2008
    #6
  7. Mr. X.

    Rob Lynch Guest

    This should work..

    http://lynchtek.com/blog/post/2009/...-ASPNETDB-Usefull-for-hosted-environment.aspx

    There is a "Use ASPNETDB" statement on the top, without a "Create DATABASE ASPNETDB" first. If you just want the tables in a normal db (something i am usually trying to do), just comment out the use aspnetdb.

    Hope that helps.


    Rob



    sloan wrote:

    Re: create aspnetdb from scratch
    28-Oct-08

    This link
    http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!160.entr
    has the link to the cmd line tool to create a fresh / blank db. (scottg
    link
    My addition is a "data transferer"

    Previous Posts In This Thread:

    On Tuesday, October 28, 2008 5:50 PM
    Mr. X. wrote:

    create aspnetdb from scratch
    Hello
    How can I create aspnetdb from scratch
    (I want a script that create all table, views, etc... on that database)

    Thanks :)

    On Tuesday, October 28, 2008 6:14 PM
    sloan wrote:

    Re: create aspnetdb from scratch
    This link
    http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!160.entr
    has the link to the cmd line tool to create a fresh / blank db. (scottg
    link
    My addition is a "data transferer"

    On Tuesday, October 28, 2008 6:32 PM
    Mr. X. wrote:

    Re: create aspnetdb from scratch
    I need especially the aspnetdb database's scrip
    In that site
    (http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!160.entr
    ) for creating all the elements (tables, views, etc...)
    that I should copy & paste it into Query Analyser on my site

    Thanks :)

    On Tuesday, October 28, 2008 6:52 PM
    brucebarke wrote:

    build the database once, then use enterprise manager or a database project to
    build the database once, then use enterprise manager or a database project t
    generate the script

    -- bruce (sqlwork.com

    "Mr. X." wrote:

    On Wednesday, October 29, 2008 1:22 PM
    Mr. X. wrote:

    If the DB was just on my computer, I could do it long time ago,but the
    If the DB was just on my computer, I could do it long time ago
    but the database, which is aspnetdb - a specific database, that for some
    unknown reason, Microsoft enforce someone who deploy his site to have,
    should be on the hosting site only SQL-Server 2005

    I try some ways to create a database
    founded on http://www.4shared.com/file/59591680/a5b7abdf/ASPNETDB_TMP.html
    .... then by Microsoft SQL Server Management I created a "bak" file
    but the hosting provider tell me everything O.K, except I should send him a
    SQL-Server 2005

    I don't know how to check the version of SQL-Server 2005 (of the link
    above)
    but if I found a link as the previous one (for SQL-Server 2005), it would be
    fine

    I just need a file : bakup file or script file, that I can put on the
    hosting server, without any problems
    I am searching that file (.bak or .sql of SQL-Server 2005 version), but I
    didn't find yet
    I don't know why just putting a file on the internet, and save efforts
    creating it, since this is a standard file (aspnetdb), that always should be
    when deploying my site

    If you have a link to that file (bak or sql for SQL-Server 2005 version), it
    would be great

    Please, help

    Thanks :)

    On Wednesday, October 29, 2008 1:58 PM
    Patrice wrote:

    You are not forced to deploy this db. Either you have something in your web.
    You are not forced to deploy this db. Either you have something in your
    web.config that tells to use this db either your provider is forcing its
    use

    Though creating a dummy db would solve your problem I would rather check the
    web.config file to make sure it is not used unintentionaly (as you don't
    need it locally it would seem your hoster is forcing (unintentionaly) this
    use ???

    -
    Patric

    "Mr. X." <no_spam_please@nospam_please.com> a ?crit dans le message de
    groupe de discussion : ...

    On Wednesday, October 29, 2008 4:31 PM
    Mr. X. wrote:

    Hi.First time after deployment on VS 2008.
    Hi

    First time after deployment on VS 2008
    (Just create the login wizard in VS 2008 - VB, and deploy)

    The I got the following error
    =====================

    Server Error in '/' Application
    --------------------------------------------------------------------------------

    Failed to generate a user instance of SQL Server due to failure in
    retrieving the user's local application data path. Please make sure the user
    has a local user profile on the computer. The connection will be closed.
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Failed to generate a
    user instance of SQL Server due to failure in retrieving the user's local
    application data path. Please make sure the user has a local user profile on
    the computer. The connection will be closed.

    Source Error:

    An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.


    ******
    ******
    After looking in google (I may be wrong, but too much sites, telling the
    same),
    I see that the above is related to sqlnetdb.mdf, and I should create one.
    Yet, I don't use any database.

    Here is the web.config, what the deployment enviormnet by VS 2008 put
    automatically :

    <?xml version="1.0"?>
    <configuration>
    <appSettings/>
    <system.web>
    <!--
    Set compilation debug="true" to insert debugging
    symbols into the compiled page. Because this
    affects performance, set this value to true only
    during development.

    Visual Basic options:
    Set strict="true" to disallow all data type conversions
    where data loss can occur.
    Set explicit="true" to force declaration of all variables.
    -->
    <customErrors mode="Off"/>
    <compilation debug="true" strict="false" explicit="true">
    </compilation>
    <pages>
    <namespaces>
    <clear/>
    <add namespace="System"/>
    <add namespace="System.Collections"/>
    <add namespace="System.Collections.Generic"/>
    <add namespace="System.Collections.Specialized"/>
    <add namespace="System.Configuration"/>
    <add namespace="System.Text"/>
    <add namespace="System.Text.RegularExpressions"/>
    <add namespace="System.Linq"/>
    <add namespace="System.Xml.Linq"/>
    <add namespace="System.Web"/>
    <add namespace="System.Web.Caching"/>
    <add namespace="System.Web.SessionState"/>
    <add namespace="System.Web.Security"/>
    <add namespace="System.Web.Profile"/>
    <add namespace="System.Web.UI"/>
    <add namespace="System.Web.UI.WebControls"/>
    <add namespace="System.Web.UI.WebControls.WebParts"/>
    <add namespace="System.Web.UI.HtmlControls"/>
    </namespaces>
    </pages>
    <!--
    The <authentication> section enables configuration
    of the security authentication mode used by
    ASP.NET to identify an incoming user.
    -->
    <authentication mode="Windows"/>
    <!--
    The <customErrors> section enables configuration
    of what to do if/when an unhandled error occurs
    during the execution of a request. Specifically,
    it enables developers to configure html error pages
    to be displayed in place of a error stack trace.

    <customErrors mode="RemoteOnly"
    defaultRedirect="GenericErrorPage.htm">
    <error statusCode="403" redirect="NoAccess.htm" />
    <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->
    </system.web>
    <system.codedom>
    </system.codedom>
    <!--
    The system.webServer section is required for running ASP.NET AJAX
    under Internet
    Information Services 7.0. It is not necessary for previous version
    of IIS.
    -->
    <system.webServer>
    </system.webServer>
    </configuration>

    Second : I put the file on the link I gave
    ==============================
    http://www.4shared.com/file/59591680/a5b7abdf/ASPNETDB_TMP.html
    and also the ASPNETDB_TMP_log.LDF

    What I see, that this database is just using to record and trace members (or
    something like that).

    I have tried to add a reference in web.config like this :
    ....
    <configuration>
    <connectionStrings>
    <remove name="LocalSqlServer" />

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

    Still I got the same error.

    The hosting company supports sqlexpress & also sql-server 2005, and insist
    to send them a ".bak" or ".sql" version
    of SQL-Server-2005.

    Neighter of them are right, since they are not SQL-Server-2005 version.

    I would be glade, whether I not need now the ASPNETDB.MDF (for some reason,
    I understood that aspnetdb.mdf is a database that must be on server site,
    when doing deployment, and also app_data folder).

    Look for any solution.

    Thanks :)


    Submitted via EggHeadCafe - Software Developer Portal of Choice
    How to display a Gravatar Image with 100 Percent Client Script Code
    http://www.eggheadcafe.com/tutorial...c-b0877c10ecb4/how-to-display-a-gravatar.aspx
    Rob Lynch, Mar 9, 2010
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    9
    Views:
    579
  2. =?Utf-8?B?dGUgZ29vZHk=?=
    Replies:
    0
    Views:
    2,165
    =?Utf-8?B?dGUgZ29vZHk=?=
    Feb 8, 2006
  3. Joseph Daniel Zukiger
    Replies:
    1
    Views:
    564
    carlo dainese
    Sep 27, 2004
  4. zelegolas
    Replies:
    2
    Views:
    3,997
    zelegolas
    Feb 25, 2009
  5. guy
    Replies:
    0
    Views:
    103
Loading...

Share This Page