0

When I do an update to a .cs file in my project, I have to upload bin/myProject.dll to my web site in order to make my changes effective. But I know that there are many asp.net website that does not need this dll, and I would like to know what is the difference between theese sites and mine. (my coworkers cant modify .cs files, because I have to compile the project on my computer, then upload the dll on the server ..)

Thanks.

Romain Durand
  • 783
  • 1
  • 6
  • 22
  • Just a suggestion. Never keep .cs files in the live server. Upload only binary files, views and other content. You must publish your project under release mode and upload the result. – Oybek Feb 08 '12 at 11:03

3 Answers3

0

Never keep .cs files in the live server. Upload only binary files, views and other content. You must publish your project under release mode and upload the result. As far as your coworkers are concerned, there is a solution called source control. This is a system that allows many developers to work simultaneously on one project. Source controls that are available just to mention few:

SVN

Team foundation server

Visual source save.

Edit

Technically there are no differences between your sites. The one which "Doesn't need dlls" actually dynamically compiles all cs files into a special directory as a dll and only then it runs. Yours is uploaded to the server already precompiled.

Also you may find this question interesting.

Cheers.

Community
  • 1
  • 1
Oybek
  • 7,016
  • 5
  • 29
  • 49
0

In ASP.Net you have Web Application Projects that need to be compiled, and Website Projects that get compiled when they are run.

You can see a writeup here comparing the two and when you should use them both http://msdn.microsoft.com/en-us/library/dd547590.aspx

In general I am against Web Site projects but for internal projects they are more than fine. I agree with the other fellow storing code files on the prod server makes me nervous :)

Dave Walker
  • 3,498
  • 1
  • 24
  • 25
  • Thanks, I just didn't get the difference between ASP.NET Applications and ASP.NET Websites ;) (It's a back office app, so website is exactly what I was looking for) – Romain Durand Feb 15 '12 at 10:48
0

What you can do is to upload your cs file to your website so that you don't have to build your application each time you do updates, although I strongly disagree with this and I would keep on building my application each time I do changes so that my website will be in release mode and not debug mode which makes it faster.

Alex
  • 5,971
  • 11
  • 42
  • 80