Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

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

I have been tasked with editing an old asp.net 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?
  • 3
  • 2
1 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.
ShepweddAuthor Commented:
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?
>>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 dll....so I'm not sure what is going on.
I'm also assuming you have a backup of the working site?

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

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 too...it 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now