Posts

Showing posts from April, 2008

Protect Your Ass, Redux

Another flaw in the human character is that everybody wants to build and nobody wants to do maintenance.   - Kurt Vonnegut I've written several times about the importance of having a serious backup strategy for your production web server, mostly about ways to backup the Registry. But there are a few other components of a good emergency recovery strategy that are important as well. A significant percentage of developers and webmaster / administrators run production sites on production machines and have no reliable backup strategy for the components of the machine that are critical to the successful operation of IIS. The mere fact that up to now you haven't had a production server blow up on you may actually have increased the statistical likelihood that you will experience such a failure! The three critical components to be protected and backed up -- with an easy path to restore them - are the Windows Registry , the IIS Metabase , and the .NET Framework machine.config file.

ASP.NET Quick 'n Dirty Exception Logging*

If you need an easy way to handle logging exceptions in your ASP.NET web application but want to avoid all the complexities of using a logging library and / or setting up all the database "Stuff", here is  an easy way to handle it:   In web.config: <appSettings>     <add key="logExceptions" value="true"/>   </appSettings >  <system.web> In Global.asax.cs: public class Global : System.Web.HttpApplication     {         public static bool LogErrors = Convert.ToBoolean(ConfigurationManager.AppSettings["logExceptions"]); //... protected void Application_Error(object sender, EventArgs e) {     if (LogErrors)     {     Exception ex = Server.GetLastError().GetBaseException();     File.AppendAllText(Server.MapPath("App_Data/exceptions.txt"),                DateTime.Now.ToString() + ": \r\n" + ex.Message + "\r\n" + ex.StackTrace);     Server.ClearError();     } }   What this does is grab the

MVP Summit -- and a Lesson from Chief Seattle

" Day and night cannot dwell together." -- Chief Seattle   The MVP Summit in Redmond / Seattle this year is proving to be valuable, at least to me. I've been focusing mostly on the tracks around Silverlight and where it's going, and it appears to me that this product is going to evolve quickly into  a killer platform that will be capable of producing enterprise - level browser based applications that do video, high-powered vector graphics /animation, and data access including ws* SOAP, REST, HTTP, TCP and even UDP transports, LINQ,  and can handle cross - domain calls with the appropriate security xml files in place. DataBinding is done, and there's more coming which will show up in the next Beta coming -- well -- let's just say "sometime soon". But the best lesson was one we learned in real life at Maggiano's in Little Italy in Bellvue , in a building hosting a Microsoft office and where the language groups dinner was held for all the VB.NET

How to get Visual Studio 2008 Pro for Free

I often read posts and other comments from people who complain that Visual Studio is too expensive, etc. Sometimes they aren't even aware that the free EXPRESS versions exist. Well, don't fret. There are two ways you can get Visual Studio 2008 (as well as Microsoft Expression Studio, XNA Game Studio, Sql Server 2005,  and even Windows Server OS)- all free. 1) If you are a university student, find out if your school has an MSDN AA Account. This is your ticket to a free copy. 2) Go to DreamSpark . Dreamspark is Microsoft's free software site for students. All you need to do is log in with your Live ID (Passport) account, and download your free stuff. You'll need to verify you are a student by choosing your school. If it's not listed, DreamSpark has partnered with JourneyEd to verify U.S. students at schools throughout the country. JourneyEd will help you through a simple verification process – it will be just like an online purchase, but it will cost you nothing. A