ASP.NET 2.0 for Dummies examples-anyone have luck w/ ASPNETVault sample code on discountasp.net?

Discussion in 'ASP.NET 2.0' started by kog, Dec 21, 2007.

  1. kog

    kog

    I thought the sample code provided with this book would give me a running start on using Visual Basic and ASP. However, I amnot able to make this work on discountasp.net. Has anyone that purchased this book been able to make this work successfully on discountasp.net?

    I upgraded to SQL 2005 database support but that did not help. Although the Help Desk provided me with a connectionstring, I am lost as to what other code I need to change to make this work. I am really at a loss.

    Thanks in advance to any kind sole who remembers being in my place and being frustrated! Kay ([email protected])

    Post Edited (kay o) : 12/21/2007 8:57:24 PM GMT
     
  2. I'll help you through any part you need.
    Anything in particular?
    Salute,
    Mark
     
  3. kog

    kog

    Thanks Mark.
    I have zipped and attached the directory that came with the book named ASPNETVault. The purpose is to have a site that people can register to have a login account for so that they can see 'members only' information.

    I uploaded the files as is to my site on discountasp.net and received an error when registering for an account. I found out that this error is because the database in the sample was created in SQL 2005 Express and discountasp.net does not allow SQL Express databases. So I upgraded my discountasp.net account to include SQL support and then tried again. I still got an error that I was not able to connect to the database. I received a connection string from the Help Desk but it still did not work right.

    Here is the connection string code I received. As you can see, the file name of the database in the sample files is aspnetbd.mdf which is located in the subdirectory 'app_data. So I named my SQL database on the server the same but it would not allow me at include the .mdf extension.

    'Data Source=tcp:sql2k507.discountasp.net;Initial Catalog=SQL2005_440882_aspnetdb;User ID=SQL2005_440882_aspnetdb_user;Password=******;'

    This leads me to think that it requires a static username and password. But that is not what I want. I want new users to be able to self register.

    Any help is greatly appreciated. Kay
     

    Attached Files:

  4. OK, hopefully I can help before you get too deep into this one.

    May I suggest that you pick one of the Start Kits to work with instead of this?

    I just looked at the example files, it's only meant as a learning tool obviously.
    Will take an enormous amount of work to build a site around this.

    The good news is, if you have the SQL Server addon already you can easily install many of the Starter Kits.
    To see a few examples look in the Starter Kits section of these forums, then the Learn section of http://asp.net

    By the way, that web.config is less than basic.
    Downloading one of the Starker Kits and looking at the connection string examples in the web.config will help you for sure.

    Hope this helps a bit...
    Mark
     
  5. kog

    kog

    Mark,
    That sounds like great advice and I will check the Starter Kits. Thank you for taking the time to assist me. Kay
     
  6. mjp

    mjp

    kay o said...


    So I named my SQL database on the server the same but it would not allow me at include the .mdf extension.


    Did you try attaching the Express database to your SQL database? See this KB: http://kb.discountasp.net/article.aspx?id=10431[/quote]

    mjp
    ---
    DiscountASP.NET
     
  7. kog

    kog

    Yes. I attached the SQL Express database to an SQL 2005 database, but that did not make it work. There is something else that is not right but I am not able to identify what exactly. I was hoping someone else had purchased this book and had successfully accomplished getting the sample code to work. Thanks for your help. Kay
     
  8. kog

    kog

    Thanks Mark. Much appreciated. Kay
     

Share This Page