To Web Site or Web App, that is the Question
by Andrew Taylor on Jan.12, 2010, under ASP.NET Programming
No doubt since Visual Studio 2005 came out, you’ve probably wondered whether you should choose to use a Web Site Project or Web App Project when creating your next website. You might have even been so brave as to do a Google search and read some of the many articles on the subject.
So what did you decide to do? And more importantly why?
Personally I always use the Web App vs the Web Site, and I have many reasons for doing this, most of them are personal preference, but some are performance and security.
Personal
I personnally like the more structured design of the app. I like being able to put my classes where I want them, not just in the App_Code folder, and I guess I just find it more clean and probably a bit more of the style I’m used to. (This from someone that used to be a diehard VB 6 programmer).
Technically
On a more technical note, I have a few reasons for preferring the Web App to Web Site.
DLL’s: I like my site in a DLL vs individual code files, there is a small performace boost I’m told, and it gives me the ability to access that DLL through other tools if I need to.
Security: DLL’s can be obfiscated and it’s easier to secure 1 folder than dozens or hundreds. If your site is hacked, it’s going to be a lot easier to change you .cs file, than it will be to figure out an obfiscated DLL, modify it, rebuild it, and post it back your server.
Keeping Busy Bodies Out: Even without obfiscation, it helps keep busy bodies out of my code. Last thing I need is some junior HTML guy deciding he can modify my code behind. (No offense Junior HTML guys)
So now you know my thoughts on it, share with me your thoughts and why you do what you do?












