deploying my app to our webserver (on win2003 machine)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vstud
    New Member
    • May 2008
    • 17

    deploying my app to our webserver (on win2003 machine)

    Hello,

    I need some begginers help here with the following:

    I developed ASP 2.0 application on my personal machine which is using the
    wwwroot localhost and everything works fine.

    my question is how do I move/transform my asp application to work on our webserver (how do i deploy it ). ?
    to be more specific, in my asp application (using the ms visual studio 2005 ide)
    the query points to my local Access d.b. that reside on local pc hard drive,
    and i need help with pointing the query to fetch records from the Access d.b.
    that reside on my webserver.

    I hope i was clear with my issues, please let me know if more information is needed.

    TIA
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    This depends on how you connect to your DB.

    If you use OleDb:
    If you had put your Access DB in your App_Data folder, you shouldn't have to change anything. If you didn't but want to, here's the connection string:
    Code:
    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\myDatabase.mdb;User Id=admin;Password=;
    If you didn't and don't want to, you just need to change your connection string to point to the correct location.

    If you use ODBC:
    Copy your DB to wherever you want on the webserver, and set up a DSN with the same name as the one on your local machine.

    If you were using the AccessDataSourc e
    Just make sure that the 'DataFile' attribute is pointing to the correct location on the webserver where you put the database.



    Now as to deploying there's more than one way to go about this. You can publish your site, which will precompile the site and deploy it to your webserver. I don't usually do that, but it's a great option.

    I just copy the directory over to the webserver. Just make sure that you set it up as an application or a virtual directory under IIS, or the application relative links (~/whatever.aspx) will not work.

    Originally posted by vstud
    Hello,

    I need some begginers help here with the following:

    I developed ASP 2.0 application on my personal machine which is using the
    wwwroot localhost and everything works fine.

    my question is how do I move/transform my asp application to work on our webserver (how do i deploy it ). ?
    to be more specific, in my asp application (using the ms visual studio 2005 ide)
    the query points to my local Access d.b. that reside on local pc hard drive,
    and i need help with pointing the query to fetch records from the Access d.b.
    that reside on my webserver.

    I hope i was clear with my issues, please let me know if more information is needed.

    TIA

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Are you using the "Publish" command to put your website on the server computer? I recomend it.
      Then check for things like mentioned in the post above.

      Comment

      • vstud
        New Member
        • May 2008
        • 17

        #4
        Hi and thank you both for the info and comments.

        i.
        I believe I'm using the AccessDataSourc e and currently that was pointing to my local access d.b. on my local hard drive folder.
        I take it that all i need is to change from DataFile="c:\as p\trx_DB.mdb"
        to DataFile="http\ \:www.mysite.co m\DB\trx_DB.mdb " ... ?

        ( i didn't get a chance to test it yet since my webserver is in the office )

        ii.
        My IIS on my webserver already have mysite.com (url for that matter) and I have
        most of the website running via HTML and old classic asp pages.
        I've added (installed) the .NET 2.0x on the webserver as well.

        other than just copying the directory to my webserver application folder, do i need specifically to "tell" iis that this .aspx is a new application?
        I also tried to publish my .aspx from my local pc to the webserver but ms IDE (visual studio 2005) only let me publish it to my local hard drive and if I select ftp location it fails... not sure why..

        any ideas will be appreciated.

        TIA

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          I PUBLISH to an HTTP location on my server. (Had to turn on frontpage extensions for my server)
          Yes, I think you need to tell IIS that it's an ASP.NET application so that the ASPNET side of stuff loads up.

          Comment

          • Curtis Rutland
            Recognized Expert Specialist
            • Apr 2008
            • 3264

            #6
            Originally posted by vstud
            Hi and thank you both for the info and comments.

            i.
            I believe I'm using the AccessDataSourc e and currently that was pointing to my local access d.b. on my local hard drive folder.
            I take it that all i need is to change from DataFile="c:\as p\trx_DB.mdb"
            to DataFile="http\ \:www.mysite.co m\DB\trx_DB.mdb " ... ?

            ( i didn't get a chance to test it yet since my webserver is in the office )
            I've never tried a web url to my db before. If you know what the absolute path is, I'd use that. If you don't, you can figure it out by
            Code:
            Response.Write(Server.MapPath("/DB/"));
            or whatever path you want. It'll return the absolute path on the server. But try it with the web url, and let us know if it works.

            Originally posted by vstud
            ii.
            My IIS on my webserver already have mysite.com (url for that matter) and I have
            most of the website running via HTML and old classic asp pages.
            I've added (installed) the .NET 2.0x on the webserver as well.

            other than just copying the directory to my webserver application folder, do i need specifically to "tell" iis that this .aspx is a new application?
            I also tried to publish my .aspx from my local pc to the webserver but ms IDE (visual studio 2005) only let me publish it to my local hard drive and if I select ftp location it fails... not sure why..

            any ideas will be appreciated.

            TIA
            In IIS, if you look at the properties for a website or directory/virtual directory, you should see an ASP.NET tab. Make sure to set it to the proper framework. (If you are using 3.5, there won't be an entry for that, it is still 2). If you don't see that tab, you need to "register" the correct version of the framework with IIS. Google for: "aspnet_reg iis"

            Comment

            • vstud
              New Member
              • May 2008
              • 17

              #7
              Originally posted by insertAlias
              I've never tried a web url to my db before. If you know what the absolute path is, I'd use that. If you don't, you can figure it out by
              Code:
              Response.Write(Server.MapPath("/DB/"));
              or whatever path you want. It'll return the absolute path on the server. But try it with the web url, and let us know if it works.



              In IIS, if you look at the properties for a website or directory/virtual directory, you should see an ASP.NET tab. Make sure to set it to the proper framework. (If you are using 3.5, there won't be an entry for that, it is still 2). If you don't see that tab, you need to "register" the correct version of the framework with IIS. Google for: "aspnet_reg iis"

              Hi,

              you were correct my IIS was pointing to the previous version, so I've change it to reflect ASP 2.05. Thanks.

              as for the Server.Mappath it's not working for me, here is a snip of it:

              DataFile= server.mappath( "db\EPE_DB.mdb" )

              however if i use the full physical location it's working:
              DataFile= "E:\myapplicati on\host\db\EPE_ DB.mdb")


              I'm not sure what I'm missing with the server.mappath command..
              let me know if you see anything.

              Thanks

              Comment

              • Curtis Rutland
                Recognized Expert Specialist
                • Apr 2008
                • 3264

                #8
                Originally posted by vstud
                as for the Server.Mappath it's not working for me, here is a snip of it:

                DataFile= server.mappath( "db\EPE_DB.mdb" )

                however if i use the full physical location it's working:
                DataFile= "E:\myapplicati on\host\db\EPE_ DB.mdb")


                I'm not sure what I'm missing with the server.mappath command..
                let me know if you see anything.

                Thanks
                The Server.MapPath command is actually part of the Codebehind. I was just suggesting that you should use it to discover your physical path in case you didn't know it, like if you were on a shared server or something where you wouldn't have access to the directory structure.

                Anyway, glad it's working for you.

                Comment

                Working...