How do I copy a visual studio 2003 project page over to another server?

Posted on 2009-04-29
Last Modified: 2013-11-26
I have been tasked with editing an old project developed using visual studio 2003. I have now made the edit to the .aspx and .cs page on our development server where now I have to make the edit live. On our development server I can see the .aspx and .cs pages but on our live server I can only see the .aspx page within iis. I usually develop using VS 2005 or 2008 so this is unfamiliar to me. Usually I would just deploy the project over to the live server where I am able to deploy both the .aspx and .cs pages and the .dll file is copied over in the backend, this doesn't seem to be the case in VS 2003. I can see a copy project option but all I want to do is copy over the one page, not the entire project?
Question by:Shepwedd
    LVL 37

    Accepted Solution

    If you made a change in the codebehind, then you need to compile the entire web app and then deploy the aspx page that changed and the app's main dll.

    Visual Studio, since its inception, has a "Web Application" model of development where all the code in all the codebehind and class files are compiled into one single dll.  When you deploy a Web Application, the html pages (like aspx and ascx, *.js, *.css, etc) pages are deployed.  But from the code standpoint, you do not deploy any *.cs or *.resx files...those all get compiled into that one dll.
    So even a minor change would mean re-compiling the entire app and publishing it.

    Starting with VS2005, MS added the "Web Site" model (while still supporting the Web Application model)...which I think is what you are used to.  You deploy the html pages as well as the code pages and the server compiles the code as it runs.

    So for your case, you don't need to copy over the *entire* project....but you do need to copy the aspx page that changed and if you changed code in any *.cs file, you need to compile the app and copy over the updated dll into the \bin folder.

    Author Comment

    Ok, i've now copied over the .aspx page and due to making a change in the .cs page i've also copied over the .dll file from my dev server's bin folder to my live server's bin folder. However, I keep getting a browser error upon loading the changed page. What I did was I kept the old .dll file and just renamed it (just incase I had to refer back to it) and then copied over the new .dll file (named the same as the original .dll file). The error I get refers to the machine.config file which seems to have a problem with the old .dll file which I renamed. Should I just delete the old .dll file or is my problem else where?
    LVL 37

    Expert Comment

    >>The error I get refers to the machine.config file which seems to have a problem with the old .dll file which I renamed.
    >>Should I just delete the old .dll file or is my problem else where?

    1. What is the exact error?
    2. Does the re-compiled code with your new changes run correctly on your development machine?

    If yes, then I would go ahead and delete the old dll...once you change the name of the dll....the process that should be happening is that IIS restarts the application and should be reading the new I'm not sure what is going on.
    I'm also assuming you have a backup of the working site?


    Author Comment

    I performed an iis reset on my live server and now everything is how it should be....few!

    LVL 37

    Expert Comment

    Glad you go it working!

    I was going to suggest an iisreset and cache clear...depending on whether or not deleting the old dll worked or not...

    But in addition to the iisreset, I would also suggest you clear out the server cache is framework specific, so .Net 1.1x in IIS use the server cache at:
    C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files

    And ASP.Net 2.x uses:
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

    Basically, you have to stop iis, then delete everything inside the above mentioned folders.
    If you do a lot of updates to the code (like on a development machine)...I'd recommend you clear those folders often.
    Visual Studio's internal "web server" also uses those folders.
    A lot of times the "I made some code changes and don't see my changes" problems can be cleared up by cleaning those folders.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now