Onion PeelsOnion Peels.NET, Technology, Life, Whatever. Mostly about .NET and ASP.NET but don't hold me to it. Articles
Montastic
2007-07-13 01:42:00 Montastic The free website monitoring service that doesn't suck Yep, it's free. Yep it doesn't suck. Simple as can be. Signup with your email only and enter the Web sites you want to monitor. It will send you an email whenever the web site goes down or restarts. No catches. Free and easy. Recommend. powered by Bloget™ - "One File, One Binary, One Blog" More About: Freebies , Mont
The Hero Machine
2007-07-05 22:04:00 This is a complete waste of time which is of course why like it and am blogging about it. The Hero Mach ine is an online drawing tool from Marvel comics that let's you quickly and easily design your own super hero. It's so easy even this blogger can do it. There are a number of templates and plenty of options that allow you to customize your hero. Here's my creation. Bloget Blane, defender of blogs, writer of wrongs (ooh, bad pun) and all around electrifying guy. My cat Euclid thinks I should get back to work. powered by Bloget™ - "One File, One Binary, One Blog"
Amazon Elastic Compute Cloud (Amazon EC2) - Limited Beta
2007-07-04 14:30:00 Lately, I've been spending time with some of the Web services offered by Amazon (yeah, the same people who sell all those books). They have some interesting services like S3, which I use to host images on this site. I'm working on an S3 browser written in .NET 3.0 I'll release later this year. Other services like EC2 are even more interesting. Here's a description. Amazon EC2 presents a true virtual computing environment, allowing you to use web service interfaces to requisition machines for use, load them with your custom application environment, manage your network's access permissions, and run your image using as many or few systems as you desire. To use Amazon EC2, you simply: Create an Amazon Machine Image (AMI) containing your applications, libraries, data and associated configuration settings. Or use our pre-configured, templated images to get up and running immediately. Upload the AMI into Amazon S3. Amazon EC2 provides tools that make storing the AMI ... More About: Beta , Cloud , Mite , Limited
Visual Studio 2005 Debugging Tips
2007-06-28 18:12:00 One of my developers at work posted this on our "tips" blog. Good stuff... Just in case you?ve never tried, it - the next time you?re looking at a call stack while stopped at a break point in visual studio 2005, try right clicking in the call stack window and investigating some of the context menu options. Here?s some that stand out. Discovering the first one just gave me a some good insight into why .NET control events were being fired without my, or our users, instigation. It is especially useful in combo with Reflector. .NET (http://www.aisto.com/roeder/dotnet/) Show External Code Changes those single line, obstuse call stack phrases ?[External Code]? into illuminating exposés of internal .NET assembly method call stacks, complete with cracked message and parameter info. Include Calls To / From Other Threads Can provide deeper insight into how your breakpoint was reached in a multithreading scenario The Load Symbols MenuThis section of the menu provides runtime access to the deb... More About: Programming , Visual Studio , Tips , Visual , Studio
Visual Studio Solution Backup
2007-06-27 03:31:00 Most of the projects I develop for myself (a.k.a. Blue Onion Software) are small. Usually less than 20,000 lines. I've thought about using some type of version control but it just seems like more trouble than it's worth. Usually I just copy the entire solution folder to zip and archive it. I do this several times a week. I've wanted a Visual Studio add-in to archive an entire solution for quite some time now. I tried using a program I found on the Code Project but it was of poor quality and annoyed me more than anything else. Now I'm using a Visual Studio add-in called DPack. It has a number of tools designed to increase programmer productivity. It contains mostly code and file browsers which I don't find all that useful. However, there is one gem buried in the middle of it called "Solution Backup ". It gets the job done with little fuss. The only enhancement I could ask for is to have automatic name generation for the backup file based on a template so I could include the dat... More About: Programming , Freebies
GOA WinForms in Silverlight
2007-06-24 14:46:00 GOA WinForm s is an implementation of the standard System.Windows.Form .NET library for both Adobe Flash and Microsoft Silverlight . It allows .NET developers to write standard WinForms applications that will run on these two RIA platforms. The look and feel of the package is faithful which is surprising when you consider it is written in JavaScript (a current restriction in Silverlight 1.1 that will be addressed in Silverlight 2.0). There are five demos on the site showing off various control groups like buttons, checkboxes, data grids and tool strips. Perhaps the most impressive demo is the Visual Studio like Forms Designer. Written entirely in GOA WinForms it allows you to visually design dialogs in much the same way as in Visual Studio. Be warned, all this is alpha and is a bit buggy (Silverlight itself is still in beta). Technorati tags: silverlight, ASP.NET, ajax powered by Bloget™ - "One File, One Binary, ...
Cool Commands for Visual Studio 2005
2007-06-21 02:41:00 I just can't resist a good add on. Gaston Milano's Cool Commands is one of those Visual Studio addon's that just fits. The one feature I really like is the Collapse All Projects in the solution explorer. This feature alone is worth the download. Fellow blogger Jim Holms has a great review of it here. Get it now! powered by Bloget™ - "One File, One Binary, One Blog" More About: Programming
HTTP Compression in ASP.NET 2.0
2007-06-11 01:01:00 Mads Kristensen writes an excellent blog called .NET Slave. Recently, he posted an article on how easy it is to enable HTTP compression in ASP.NET 2.0 without having to touch IIS. This is a handy thing to have when using hosted services like Go Daddy where you don't have access to the IIS configuration. I've had it bookmarked for some time intending to add it to this site. Well I finally took the plunge and added it. The code is surprisingly brief and works as advertised. However, I did run into a few issues that the original code did not address. For instance, the built-in web server in Visual Studio 2005 does not seem to work correctly when compression is enabled. Also, some services like Feed Burner do not accept compression even though their request header indicates otherwise. I've added a few extra checks to the original code to fix these issues. using System;using System.Web;using System.IO.Compress ion ;public class CompressionModule : IHttp Module{ const string GZIP = "gzip... More About: Programming , Sion
Windows Live Writer Beta 2 100% CPU Fix
2007-06-08 03:08:00 Windows Live Writer Beta 2 is out. Others have blogged about it's many new features. To be sure it's one of the nicer off-line blog editors available today. But alas, with all the new features came one really annoying bug. When I first start the program, it pegs the CPU for about 5 minutes. Fortunately, there's a fix. Run services.msc and then disable the Windows Live Setup Service. Problem solved. Technorati tags: Windows, Live Writer, Bug powered by Bloget™ - "One File, One Binary, One Blog" More About: Windows , Windows Live
Getting the current date and time in batch files
2007-06-07 03:49:00 I completely stole this article from here. It's such a useful bit of information I'm blogging it so I can "Google" myself later.I still do the occasional batch file solution for tasks, and sometimes I need to get the current date and time on the system for processing. Since I just had to research this again for another little project, I decided it was high time to blog it. Batch files can use the system variables %DATE% and %TIME% to get the current date and time of the system. These variables return data in the following format: %DATE% gives DOW MM/DD/YYYY (may vary depending on you location - you can run echo %DATE% at a command prompt to see what values you get). So for today, as I'm writing this post, the output is: Sun 04/02/2006%TIME% gives HH:MM:SS.hh where HH is hour (in 24-hour format), MM is minute, SS is seconds, and hh is hundredths of seconds. Who needs hundredths of seconds? Don't know for sure, but it's there if you want.This is all well and good, but what if you... More About: Time , Current , Files , Rent
Bloget 0.8 Released
2007-06-03 21:09:00 Another, month, another alpha. Don't know if anyone has noticed by I've been hitting alpha releases at about one per month since October. Bloget? 0.8 is here and it has some cool new features. Perhaps the most useful new feature is the built-in search control. Searching is straightforward to add. Simply add a Bloget search control to your Web page and Bloget does the rest. Of course search results can be customized using templates so you can get just the look you want. And speaking of customizations, you can now customize the content of your RSS feeds using ASP.NET's powerful template facility. Now you can insert custom content like advertisement scripts directly into your feeds. Posts can now include related posts automatically. This is a powerful technique for making your site "sticky" by suggesting additional posts on your site related to the current content. Related posts are "weighted" giving preference to titles and categories so that the most relevant postings are display... More About: Freebies , Released , Lease , Ease
Have feed, will podcast
2007-05-26 22:49:00 Check out my new podcast. Get this widget! If you don't see the flash player widget above (IE sometimes has problems with it), click this link to use the Feed 2Post player (which is also very cool by the way). Ok, so I cheated just a bit. Feed2Podcast is a free service that converts any RSS feed to a podcast. It actually works much better than I expected. Simply point this free online service to your feed URL and it does the rest. You can customize the look of the widget or simply add the generated link to your Web site or blog. The voice synthesizing is quite good although it will stumble on constructs like $20 (Dollar 20). It's a great way to offer an alternate form of your feed. Technorati tags: blog, podcast, rss powered by Bloget™ - "One File, One Binary, One Blog" More About: Freebies
gliffy Online
2007-05-24 13:42:00 Here's a fun little find. Gliffy is an only drawing program. It's very much like Visio but without the headaches. I always find myself a bit lost in Visio but with Gliffy I'm in productive and focuses. I think this is mostly because they make the easy stuff easy. Here's a drawing I did within 2 minutes of logging on for the first time. Ok, I won't win any awards for this. The point here is that I'm drawing and posting quickly. In fact, because I've shared this document, others can edit it. Makes for some nice collaboration. The free version limits the number of documents you can store but for a measly $20/year you get unlimited use. Technorati tags: Online Applications, Drawing, Visio powered by Bloget™ - "One File, One Binary, One Blog" More About: Line
Chocolate
2007-05-24 01:55:00 I love chocolate. I also feel guilty sometimes because I perceive it as unhealthy. Well bucko, this site dispels some of those myths about about the dark side. According to AllChocalate.com chocolate has about as much caffeine per serving as a cup of decaf, doesn't cause acne, hyperactivity, migraines, tooth decay or addiction. He even makes you attractive! (Ok, I threw that one in). There's a great video on tempering chocolate that my daughter and I intend to try this weekend and even which chocolates go with which brandy (some one pinch me please!). Ok so maybe I do have an addiction but really if you like chocolate you owe it to yourself to visit this site. Technorati tags: Choco lat e , Life powered by Bloget™ - "One File, One Binary, One Blog" More About: Late
Impeachment Maybe?
2007-05-23 00:18:00 This poll from today's MSNBC Live Vote is very telling indeed. What's interesting is the forcefulness of the question. It's not do you approve of the job the President is doing but should he be impeached. That's a much more polarizing question and yet 88% still say he should go. Maybe people don't understand what impeachment is. By this poll, Bush's popularity rating is 12% (if you include the I don't knows). Technorati tags: impeachment, bush, politics, voting, life powered by Bloget™ - "One File, One Binary, One Blog" More About: Life , Impeachment , Impeach , Peach
15 Answers to Creationist Nonsense
2007-05-19 23:39:00 This is an article from the July 2002 issue of Scientific American and still remains in my mind one of the best summaries of the issues to date. Anyone interested in the debate between Evolution and Intelligent Design would do well to read this. To help with answering them, the following list rebuts some of the most common "scientific" arguments raised against evolution. It also directs readers to further sources for information and explains why creation science has no place in the classroom. Evolution is only a theory. It is not a fact or a scientific law Natural selection is based on circular reasoning: the fittest are those who survive, and those who survive are deemed fittest Evolution is unscientific, because it is not testable or falsifiable. It makes claims about events that were not observed and can never be re-created Increasingly, scientists doubt the truth of evolution The disagreements among even evolutionary biologists show how little solid science supports evolution... More About: Science , Nonsense , Creationist , Answers , Creation
Handy Command Line Options
2007-05-19 03:29:00 Here is a list of commands you can execute from the Run command prompt in XP: Accessibility Controlsaccess.cpl Add Hardware Wizardhdwwiz.cpl Add/Remove Programsappwiz.cpl Administrative Toolscertmgr.msc Character Mapcharmap Check Disk Utilitychkdsk Clipboard Viewerclipbrd Comm and Promptcmd Component Servicesdcomcnfg Computer Managementcompmgmt.msc Date and Time Propertiestimedate.cpl DDE Sharesddeshare Device Managerdevmgmt.msc Direct X Control Panel (If Installed)directx.cpl Direct X Troubleshooterdxdiag Disk Cleanup Utilitycleanmgr Disk Defragmentdfrg.msc Disk Managementdiskmgmt.msc Disk Partition Managerdiskpart Display Propertiescontrol desktop Display Propertiesdesk.cpl Display Properties (w/Appearance Tab Preselected)control color Dr. Watson System Troubleshooting Utilitydrwtsn32 Driver Verifier Utilityverifier Event Viewereventvwr.msc File Signature Verification Toolsigverif Findfastfindfast.cpl Folders Propertiescontrol folders Fontscontrol fonts Fonts Folderfonts Free Cell ... More About: Options , Handy , Hand , Line
Junction v1.04
2007-05-19 03:24:00 By Mark Russinovich Introduction Windows 2000 and higher supports directory symbolic links, where a directory serves as a symbolic link to another directory on the computer. For example, if the directory D:SYMLINK specified C:WINNTSYSTEM32 as its target, then an application accessing D:SYMLINKDRIVERS would in reality be accessing C:WINNTSYSTEM32DRIVERS. Directory symbolic links are known as NTFS junctions in Windows. Unfortunately, Windows comes with no tools for creating junctions - you have to purchase the Win2K Resource Kit, which comes with the linkd program for creating junctions. I therefore decided to write my own junction-creating tool: Junction . Junction not only allows you to create NTFS junctions, it allows you to see if files or directories are actually reparse points. Reparse points are the mechanism on which NTFS junctions are based, and they are used by Windows' Remote Storage Service (RSS), as well as volume mount points. Please read this Microsoft KB artic... More About: Freebies
DoubleDesktop
2007-05-18 03:41:00 DoubleDesk top is a smart and elegant system tray utility that effectively doubles the width of your Windows desktop. It's simpler to use than many similar programs: just mouse-click on its icon or hit a keystroke combination to switch between "left" and "right" parts of the desktop. This lets you easily rearrange all your application windows between the two desktop parts. I've used this program for years and when I introduce it to others they are pleasantly surprised. The program itself is simplicity. It creates two desktops that you can switch between instantly using a key stroke or tray icon. I like it for development on my laptop. I keep Visual Studio 2005 one screen and MSDN Help on the other. It's a nice substitute when you don't have two screens. Highly recommended. powered by Bloget™ - "One File, One Binary, One Blog" More About: Freebies , Bled
GhostDoc helps with Commenting your Code
2007-05-13 21:56:00 <summary> GhostDoc is a free add-in for Visual Studio that automatically generates XML documentation comments for C#. Either by using existing documentation inherited from base classes or implemented interfaces, or by deducing comments from name and type of e.g. methods, properties or parameters.</summary> .NET languages like C# and VB.NET have a nifty little feature called XML comments that enable the developer to add comments about properties and methods in the code. Later, the compiler can gather these comments along with other information and generate an XML file. The XML file in turn can be used by tools like NDoc and Sandcastle to build professional grade documentation for code. Once in place, the whole process can be automated to create documenting with every build. This is all well and good but you still have to write the darn comments. Here's GhostDoc comes in. It can give you a springboard to get you going by using existin... More About: Programming , Freebies , Code , Comment , Comm
TAB auto complete with wildcards
2007-05-05 05:11:00 If you use the command shell in XP, then you probably already use the TAB key for auto-complete. One new thing (to me anyways) is that this also works with wildcards, so you can type this: devenv *.sln Hitting TAB will cycle through all files that match the pattern, for this example, you get this: devenv Kilroy.sln This is match faster than what I was doing before: devenv K Hitting TAB here, and you have to cycle through a dozen filenames that begin with K, before getting to the desired .sln file. Technorati tags: Windows, XP, Cmd, Shellpowered by Bloget™ More About: Auto , Cards , Wildcard , Complete
Changing Build Output Verbosity in VS 2005
2007-05-03 03:43:00 When builds go wrong, it's important to know where in the process things broke. The MSBuild default verbosity setting in Visual Studio 2005 is set to minimal but you can change it by going to Tools.Options... and navigating to Projects and Solutions and then Build and Run. Setting the output to Detailed gives much more detailed information about the build and can be a real help in debugging. Technorati tags: Visual Studio 2005, C#, .NET, MSBuildpowered by Bloget™ More About: Programming , Changing , Chang , Chan
Bloget Alpha 7
2007-05-02 05:34:00 Bloget alpha 7 is ready for download. There are the usual little fix ups and polishing here and there. I've also spent a bit of time cleaning up unit tests and running code analysis to make sure the code stays reliable and clean. Even so, I did manage to get a few new features in this month. Archive control - Lists months which have blog postings. I like Bloget's index better but many blogs have this so I've added it. Blog Roll control - Point this control at your OPML file (http:// or file://) and you have an instant blog roll. It can even randomize and limit the selections for large blog rolls. Blog Title control - Sometimes you want to separate the title from the body of your blog. This control let's you do just that. Specify log folder in web.config - Bloget has always had great logging from day one. This is an optional setting let's you put the logs right where you want them. Documentation Updates - Keeping documentation up to date is always a chore. Unlike many freew... More About: Alpha
136,000 Hours of Dreaming and Counting
2007-04-30 00:33:00 I've always been fascianated with sleep. I'm not sure why, but its one of the few human behaviors that actually interests me. I remember discovering a book in the University of Michigan Graduate library on the -3 third level (the minus is not a mistake) called "Some must watch while others sleep". The author was the same person (his name escapes me) who coined the phrase "Rapid Eye Movement" commonly refered to as REM sleep. I was simply amazed at the accounts of sleep disorders and theories as to why we sleep. Discover recently published an article called "20 Things You Didn't Know About... Sleep". One fact caught my attention: Dream ing is connected to bursts of electrical activity that blow through the brain stem every 90 minutes during REM sleep. Over a lifetime, an average person spends more than six years dreaming, clocking more than 136,000 [hours] in all. 20 Things You Didn't Know About... Sleep Now that's some power napping.powered by Bloget™ More About: Life , Dreaming , Count , Hour
Inserting Quotes in MSBuild Tasks
2007-04-29 18:35:00 I've finally got around to cracking open the MSBuild documentation and writing a few custom scripts. If you program in Visual Studio 2005, you're using MSBuild and like most things programming, its worth some time to understand the tool. It's fairly straight-forward to learn and I won't repeat the already very good tutorials available all over the Internet. I did run into one problem that proved irritatingly hard to resolve. Consider the following:<Exec Command="c:program filessome foldermyprogram.exe" /> When MSBuild tries to execute this task, you get an error saying it couldn't execute "c:program". Obviously the spaces in the command are causing a problem here. The question is, how does one quote the command inside an XML file? My first thought was that since it is XML, I should be able to use the standard XML character entities.<Exec Command=""c:program filessome foldermyprogram.exe"" /> Nice idea, but it doesn't work. Same error, same... More About: Programming , Quotes , Tasks , Quote
Publishing to Bloget with Google Docs & Spreadsheets
2007-04-28 18:41:00 I'm not sure how long this has been available but you can now post to your blog using Google Docs & Spreadsheets. You can add your blog by clicking the Publish button. In the dialog your see a button labeled "Post to blog".Settings support most major Web services like Blogger. There's also support for MetaWeblog enabled blogs like Bloget pictured below:As a blog editor, Google Docs & Spreadsheets is a bit awkward. For instance, to add image from a Web source you have to edit the HTML directly. There is a function to insert pictures from your computer however. One advantage of using Google Docs & Spreadsheets is it does keep a revision history of your document which can sometimes be handy. Also missing are tools to insert tags or blog preview similar to Windows Live Writer. Until there are more blog friendly features I'd stick with a more dedicated blogging editor. Oops! Looks like there still some bugs to iron out. For some reason, Google Docs & Spreadsheets retur... More About: Publishing , Shin
SimpleWeather
2007-04-28 03:21:00 The picture really says it all. Simple Weather is weather without all the fuss and advertisements and endless navigation. I love it! powered by Bloget™
PRE/CODE/TT Fonts too small in Firefox
2007-04-24 02:58:00 Have you noticed how much smaller the monospaced fonts are in Firefox for the <pre>, <code>, <tt>, <samp> and <kbd> tags? There also a bit small in Opera. As far as I can tell this is a bug. There are some articles that try to explain why this rendering is correct but I don't buy it. It just plain looks wrong in my opinion. Fortunately, there's an easy fix for this using style sheets. Add the following to a style sheet:pre, code, samp, kbd, tt { font-family: "Courier New" , monospace; font-size: 100%; font-style: normal; line-height: normal;}I've found this to get much more consistent results in IE7, Firefox and Opera.powered by Bloget™ More About: Browsers , Programming , Code , Small
Adding Information to Exceptions
2007-04-24 01:58:00 This is an excerpt of a post from Marc Brooks about Exception Handling in .NET. If you do have contextual information you can add to an exception, DO SO. Use the Exception.Data collection, that's what it is there for! You can add the values of interesting parameters to you methods. This is especially useful in the context of a database layer or other low-level library. You can squirrel-away the SQL and all the parameters. Only do this if you think that these details will be useful for post-mortem diagnosis. If the information you log is transitory it will NOT help tracking down errors from logs. This is (mostly) good:catch (Exception ex) { ex.Data.Add("SQL", command.Text); ex.Data.Add("key", myKey); throw; }If you add things to the Exception.Data collection, make sure that you don't conflict with what is already there as this is a HashTable. I use the catching-class's name to scope the values. This is much better than above:catch (Exception ex) { ex.Data.Add(String.F... More About: Information , Inform , Informa , Form
301 Moved Permanently and ASP.NET
More articles from this author:2007-04-23 05:35:00 Yousef, over at My C# Corner has an nice article on why you should use 301 response codes to redirect your www.xyz.com site to xyz.com or vice-versa. In short, search engines might misinterpret the two sites as duplicates and reduce your page rank accordingly. Also, your page rankings get split across multiple sites. The easy and correct way to fix this is to issue a 301 permanent redirect from one name to the other. Yousef even suggests using the Application_BeginRequest method in your Global.asax file. All good stuff. Here's his sample code. void Application_BeginRequest(object sender, EventArgs e){ if (HttpContext.Current.Request.Url.ToString ().ToLower().Contains ("http://mycsharpcorner.com")) { HttpContext.Current.Response.Status ="301 Move d Perm anently"; HttpContext.Current.Response.AddHeader("L ocation",Request.Url.ToString() .ToLower().Replace(http://mycsharpcorner. com, "http://www.mycsharpcorner.com")); }} This code is OK but with just a little bit of e... More About: Programming , Erma , Permanent 1, 2, 3, 4, 5, 6 |



