rehab for asp.net in production
Posted by jonathan - 20/02/08 at 07:02:06 amCompared to my buddies, Noam and Jason, I have always embodied the old webmaster job title the more them. This means I tend to work the box administration and configuration as much as the code. As I release my day-time code to beta, once again I am revisiting deployment control measures.
Question 1 - Do you manipulate, muck up, mess with the machine config?
I have been burnt by the GAC before <future post/> so I tend to deploy my apps with everything they need right in the bin and app folders. This means I a bit less tidiness, having have extra dlls in my bin and that I make most tweaks in my app web.config but has the benefit of easy deployment. Deployment is not the time you want to be messing with settings!
A recent post I came across from ScottGu’s blog linked to this article, Top 10 Best Practices for Production asp net Applications. I have read similarly titled articles in the past so I went here on a lark, expecting to find nothing new, but I was pleasantly surprised. The number one new tidbit was, “Set retail=’true’ in your machine.config”. Never heard of that before, but if true it does a hat trick:
This will kill three birds with one stone. It will force the ‘debug’ flag in the web.config to be false, it will disable page output tracing, and it will force the custom error page to be shown to remote users rather than the actual exception or error message. For more information you can read Scott Guthrie’s post or the MSDN reference.
I have to test it out, but I wish I had known about it years ago when I worked in a shop with very loose deployment controls. Developers were constantly leaving crumbs on my freshly vacuumed carpet, page level trace=”true” statements. Once tested I’ll then have to figure out how to role out machine.config changes to a web farm since my current company is freakishly spendthrift with the servers.
Question 2 - Do you deploy source code?
In a compiled language such as java or c#, do you deploy source code? My only real working knowledge is in c# so I’ll stick to that domain for now. This question arises as I have some java guys on the team who want to push .cs files to the server to have the “ability to patch code”. For me this smells like a glade plug-in, the scent while nauseating is really covering up the stank of bad source control management.
Fortunately google comes to the rescue as a search for for “deploying source code” gave me this first read from a relatively good source, aspnetresources.
The whitepaper also lists JIT compilation, but I won’t go there. It’s a questionable approach which is outside of the scope of this article. Please, refer to Chapter 4 of the whitepaper, “Deployment Issues for .NET Applications”, to read more about NGEN and JIT compilation.
The white paper mentioned is this, Deploying .NET Framework-based Applications at Patterns & Practices, which is a better source, but the paper is a bit dated being published in 2003. After a quick read that did not really give me anything useful.
After changing search terms, “deploying .cs files”. The first thread, mentions publishing .cs files, but not a single person says they do it. They mostly hawk the web deployment project and/or the web application project, which is of course what I’m already selling.
Dr. Peter A. Bromberg, creator of eggheadcafe says, “I wouldn’t even consider deploying .cs files”. - eggheadcafe
Having read the esteemed Dr Bromberg a few times over the years, that quote is good enough for me, but I am still searching for the article that explains the pros of deploying source. Let me know if you find it and make sure it is a reputable source too.
To top it off here’s my favorite qoute from Jason, invoking a bit of Amy Whinehouse,
“NO NO NO… when you ‘patch’ you create and unpredictable hybrid release that isn’t really anything.”
death and taxes
Posted by jonathan - 23/12/07 at 07:12:54 am
I was poking around on a buddy’s new site, ohmygov, and came across an interesting visual of government spending. The budget graph uses a pictograph to display the relative size of different areas of money that is taken from you and spent by washington. I am always amazed at how people fail to make the connections between gov spending and their daily lives. I quick glance at the graph shows how much of it is dominated by military spending and how little goes to education and health care. This poster is going up at my office and should be a good information radiator as we go into the 2008 presidential throw-down.
hiding behind 35mpgs
Posted by jonathan - 22/12/07 at 12:12:42 pmMeant to write about this a few days ago, but a not so well informed post over at my buddy foo’s sites, a polish strangely republican guy, which gave general praise to the prez on the recent energy bill sparked my otherwise lazy ass to put my thoughts together. While Yahoo’s headline reads, “Bush signs bill boosting fuel standards”, and the Atlanta Consitution-Journal reads, “Energy bill brightens prospects”. A deeper read and commentary over at renewableenergyaccess.com starts by saying:
Everyone in the renewable energy community tried to put a good face on it, but let’s face it — we have a second recent Energy Bill with little support for renewable energy and energy efficiency.
I continue to lose faith in the Janus faces of our governments and state loud and proud in Google we trust. Not only are they, and hopefully soon to be me, working on rechargeit,
RechargeIT is a Google.org initiative that aims to reduce CO2 emissions, cut oil use and stabilize the electrical grid by accelerating the adoption of plug-in hybrid electric vehicles and vehicle-to-grid technology.
but I recently found out they are also working on RE < C
Clean and affordable energy is a growing need for our company, so we’re excited about launching RE < C , a strategic initiative whose mission is to develop electricity from renewable sources cheaper than electricity produced from coal. Initially, this project to create renewable energy cheaper than coal will focus on advanced solar thermal power, wind power technologies, and enhanced geothermal systems – but we’ll explore other potential breakthrough technologies too.
Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds.
Valid XHTML and CSS.