How to successfully deploy a VWD2005/SQL2005 application on DASP's Server??

Discussion in 'ASP.NET 2.0' started by wisemx, May 1, 2008.

  1. G'day mate...
    I'm willing to help you through this, no worries. [​IMG]

    1. The SQL files are SQL Server scripts.
      Dripping them anywhere on the server is no different than uploading text files.
      They server no purpose on the server.
      You can however use the Express version of the SQL Management tools to connect to your DASP SQL server.
      Then you can execute those SQL scripts, given they are valid, they will create the tables and roles.
    2. There are easier ways to do this here.
      If you added SQL Server 2005 you can attach your Express DB in the Control Panel.
    3. Please let me know what you want step-by-steps on first, I'm here for ya. [​IMG]
     
  2. Good day y'all...

    I would like to start by thanking truthfully from the bottom of my heart anyone who can please guide on a stepbystep approach (aka DummyStyle) on how to correctly upload my web app made using VWD2005 and SQL 2005 (Express Edition) onto this company's server to finally and once for all test the app live on the net. Before you start figuring out how to help me, please know that my site (a very simple site that I built for free for a friend of mine here in Australia for his restaurant) has been hosted by DASP with no problem. Then my friend asked me to develop a simple form on the site where his customers can rate and comment the food a service, and enter these inputs into a database and that he can check on the net using a login form, etc etc....
    Using Visual Web Developer 2005 Express Edition, combined with the SQL 2005 Express that comes with it, I carried out this modest project and it has run flawlessly on my local machine. However, the nightmare and migrane-like headaches began when I tried to upload this to the DASP Server (of course I did -well, my friend- buy the SQL addon and it's activated).

    After 54lts of coffee, someone on this forum gave me a link to an article by scottgu where he explains, in a very understandable English, the process for doing this by downloading the Database Publishing Wizard. I followed all the steps thoroughly and converted my .mdf files into .sql files and so on... When I got to step 3 (Using our .SQL files to create our remote databases) I got hic-ups because I couldn't figure out what kind of SQL access my hosting company offers (DASP).

    I did modify the web.config file (I hope I did it correctly): Please see the below the web.config code I modified.

    I afterwards just dragged and dropped the newly created .sql files onto the DASP server.... and nothing happened.
    I then dropped them into the App_Data folder... nothing happened.

    I give you all the permission to check out www.pocolocorestaurant.com.au/reviews.aspx and see how the form once it's submitted, will send you to the comments_error.aspx page that I created to let the users know if there has been an error with their form. When successfully submitted (and of course the input entered into the db), the user will view a page (comments_confirm.aspx) that will, obviously, thank them for their inputs and blah blah....


    ********************* The web.config file connectionString tags I modified *****************
    <connectionStrings>
    <!--<add name='commentsConnectionString1' connectionString='Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\comments.mdf;Integrated Security=True;User Instance=True'
    providerName='System.Data.SqlClient' /> This is the connection string fo my local machine-->

    <add name='commentsConnectionString1' connectionString='Data Source=tcp:sql2k000.discountasp.net;Initial Catalog=SQL2005_000000_comments;User ID=SQL2005_000000_comments_user;Password=000000;'/>
    <remove name='System.Data.SqlClient'/>

    </connectionStrings>
    ************************************************************************************
    Obviously the User and Password I pasted above are different to the real ones
    ************************************************************************************


    *********** Below is the VB and SQL code for the reviews.aspx age where the form is (if it's of any relevance) **************
    ***********************************************************************************************************

    Protected Sub submit_Click(ByVal sender As Object, ByVal e As System.EventArgs)

    Dim commentsDataSource As New SqlDataSource()
    commentsDataSource.ConnectionString = ConfigurationManager.ConnectionStrings('commentsConnectionString1').ToString()

    commentsDataSource.InsertCommandType = SqlDataSourceCommandType.StoredProcedure
    commentsDataSource.InsertCommand = 'commentInsert'

    commentsDataSource.InsertParameters.Add('firstname', firstname.Text)
    commentsDataSource.InsertParameters.Add('lastname', lastname.Text)
    commentsDataSource.InsertParameters.Add('email', email.Text)
    commentsDataSource.InsertParameters.Add('foodquality', foodquality.Text)
    commentsDataSource.InsertParameters.Add('service', service.Text)
    commentsDataSource.InsertParameters.Add('comments', comments.Text)

    Dim rowsAffected As Integer = 0

    Try
    rowsAffected = commentsDataSource.Insert()

    Catch ex As Exception

    Server.Transfer('comments_error.aspx')

    Finally

    commentsDataSource = Nothing

    End Try

    If rowsAffected <> 1 Then

    Server.Transfer('comments_error.aspx')
    Else

    Server.Transfer('comments_confirm.aspx')

    End If

    End Sub

    ********************************************************************

    ONCE AGAIN THANKS ALOT FOR ANY HELP

    /emoticons/yeah.gif
     
  3. Hi Mark

    Thanks for your willingness to help me.... Ok, I have connected to my DASP SQL Server 2005 using my SQL Server Mangement Studio Express 2005 by following the connection steps...

    Now, how do I go about putting my DB in that server?? And which CP are you refering to on your previous post? The DASP one??

    What are the steps to follow once I open the Tools menu on the SQLSMSE ???

    Thanks millions....

    PS: Hope your daughter is feeling better /emoticons/turn.gif
     
  4. Thanks mate, Gabriela is back to being a Princess.
    http://www.hdforums.com/upfiles/29633/asppg_Hg206668233.jpg

    Yes the DASP control panel.
    If it was SQL Server 2005 you added you have an option in the Database section to attach an Express DB.

    Be careful however as it will wipe out your current data.

    If you need specific help let me know, I'm even willing to log in and do it for you.
    Because I care and because I'm a habitual Nice Guy. [​IMG]
    Salute,
    Mark
     
  5. Dear Mark,

    I think I quite got it, yet before I decide to upload my .mdf files, I must ask you if Im uploading them for the first time then there's no data to be wiped out anyways.. isn't it??

    Thanks again.

    Rod.
     
  6. Hi Again Mark,

    I couldn't resisit the temptation and I went ahead and uploaded the mdf files onto the Server2005 and then I checked my SQLSMSE and connected to the DASP database and I saw the files over there.... But unfortunately when I went to the website none of the .aspx pages would open, giving me the following error message:

    **************************************************************
    Server Error in '/' Application.
    The resource cannot be found.
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

    Requested URL: /reviews.aspx

    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
    ***************************************************************
    I uploaded the aspnetdb.mdf which is the default one which has all the configurations, right? then I uploaded my comments.mdf..... would you know what could have happened here?? I did reload the .aspx pages afterwards but the error message kept coming up....

    Thanks again mate for your assistance....

    PS: Nice photo of your kids...
     
  7. Looks like this may still be confusing you mate.
    I will indeed continue to help you.

    As you know by now the Express DB's are not supported but you can attach one if you have a SQL Server 2005 addon.
    If you only have the Express products I can create a video showing you how to merge data by using SQL commands.
    Of I'm willing to do that for you too, just let me know.
    Salute,
    Mark
     
  8. Sure mate... hehehe

    Ok, I've got Visual Web Developer 2005 Express Edition... then i've got SQL Server 2005 Management Studio Express. I've created the web apps + databasing using visual studio.. I barely even opened the SQLSMSE to do so... just opened a couple of night s ago when I connected to the DASP Server... Im running Vista Home Premium and Im on

    There's something called SQL Configuration Manager too but I haven't touched it... What else do you need??

    Thanks again for all the help... I am a little slow with all this as I just started learning all this web stuff recently when Im 31 years old... had i known b4, i would've started 10+ years ago or so... hehe.... but I'll get there soon...

    Ok mate... talk to you soon.. Thanks a million

    Rod
     
  9. Thanks mate, but Id feel bad if you have to make a video (although very thankful) to show me how.... You can either do that or I can give you permission to upload the files successfully onto my account..

    Yes I'm trying to get into the whole web programming stuff on a self-teaching approach and this is the first time I've come across databasing and uploading files onto the server... So it is still somewhat puzzling for me... but fortunately there are good people out there, like you who are willing to give a helping hand...

    So i leave it up to you my friend....

    'Salute'....

    Rod.
    PS: If you ever come to Australia, let me know... we'll take good care of you over here...
    Cheers
     
  10. We're almost mates for life, thanks. [​IMG]

    Give me a list of the tools you're using right now, versions too.
    For example, it will help to know which version of the SQL Server Express product you installed, there are three.
    Salute,
    Mark
     
  11. Sounds cool buddy

    Whenever you can...

    Thanks again....
     
  12. Howdy mate...
    I'm wiped, it's been an incredible day and my energies are gone. [​IMG]
    In the morning I'll fire up the XP box I've got Express products installed on and create the steps for ya.
    Salute,
    Mark
     
  13. OK...Energies are back, kids just got on the School bus too. [​IMG]

    Don't know what his problem was but my 3 year old, Lucas, kept waking all night long.
    Saying something about monsters....
    Now I've got to find out what his brother and sister did to him yesterday. [​IMG]

    Back to the topic now. . .

    Transferring data from SQL Server Management Studio Express to your remote SQL Server.
    1. While this is possible it is not simple. (But I wish it was)
    2. SQL Express does not have the data transfer pumps the full versions have.
    3. With the Express versions you will need to create SQL scripts. Not too difficult but not easy either.
    4. You can however get a Developer version of SQL Server for less than $50. (Amazon.com)
      The Developer version of SQL Server 2005 has all the bells and whistles, it is not lacking anywhere.
    5. To do this with the Express version fire it up and connect to at least one of your local Dbs.
    6. To add more local DBs right-click where it shows Databases on the left side and choose Attach.
    7. Now you are ready to merge data, tables, etc.
    8. To create or re-create the DB tables right-click on theTable name and choose ScriptTable as.
    9. Then either script the Database Tableto the Clipboard or a File.
      (The file can be saved anywhere and reused, even on-line once you connect to your remote SQL Server.)
    10. At the top of this script will bea USE statement you will want to removeto use on your remote SQL Server.
      For example, "USE [...\APP_DATA\ASPNETDB.MDF]"
      Just delete that line each time when working with the remote SQL Server as it will use the proper DB.
    11. You can then connect to your remote SQL Server and execute that script.
    12. To save records and use them in other DBs you Script the Table as SELECT to, then New Query window.
    13. Then click the Execute button at the top.
    14. Right-click on the records, Select all, then Save Results as.


    Those are the basic steps for the Express versions.
    With the Developer versions you have Wizards that can transfer records for you.
    Need any more help with this let me know, and I do hope this wasn't too confusing.
    Salute,
    Mark
     

Share This Page