Catch All vs. Catch Explicit…

by Mwwhited 12. May 2010 20:37
I knew I liked writing my try{} catch{} blocks to catch all exceptions instead of explicit Exceptions… but I always had a hard time explaining why.  Most of the time I would just point out that I typically write backend long life processes that must be very reliable and must avoid causing the process to fail as much as possible.  But I would like to thank Dhanji R. Prasanna from his book Dependency Injection: Design Patterns using Spring and Guice.  Giving me a great example. ... [More]

Tags:

Recommended Reading List for Geeks

by Mwwhited 2. February 2010 19:56
.Net Framework 2.0 Application Development Foundation .Net Framework 2.0 Web-Base Client Development Designing and Developing Web-Based Applications Using the .Net Framework Designing and Developing Enterprise Application Using the .Net Framework Introducing LINQ Windows Communication Foundation 3.5 Unleashed Windows Workflow Foundation Step by Step The C# Programming Language Expert .Net 2.0 IL Assembler The Pragmatic Programmer   (It’s been about two months... [More]

Tags:

Viva Las Vegas...

by Mwwhited 21. November 2009 15:08
Pretty fun so far.  I think I have a few good photos and I'm only down 12 bucks (while I have played several hours of blackjack.)  Walks up one side of the strip and down the other this morning... this place is pretty dead when the sun comes up :)...  Was nuts last night though... tons of people playing craps, roulette, blackjack, poker.  Most of the games currently seem like a great way to lose lots of money, but I figure that's the point. 

Tags:

Socket Tunneling over WCF

by Mwwhited 13. November 2009 23:41
A few months back someone on Stack Overflow asked if it was possible to create a VPN client using WCF.  Unfortunately, while it is not possible to write a VPN client in 100% in WCF, it is possible to write a socket tunnel using WCF as the transport.  I wrote this tunneling proxy back in early 2008 as a proof of concept and it worked for most protocols.  (Pretty much anything that only used a single  socket connection that was may from the client to the server,  Kerbose a... [More]

Tags:

ISO Images from .Net

by Mwwhited 1. November 2009 17:24
I put together a quick framework for reading ISO disk images from .Net.  This was written in C#.   Again it is a quick demo framework so it does not have any exception handling and should probably not be used in production code. It has been written to use any stream but really it needs to support seeking.  I would suggest only MemoryStreams and FileStreams, but you can have fun with anything you like. ISO9660.zip

Tags: , , ,

Programming

Unmanaged Exports...

by Mwwhited 31. October 2009 14:20
I prefer to write mostly in .Net and C# these days.  But sometimes you need to work with external systems.  On particular system I have been working with supports COM interop but the deployment model leaves much to be desired.  In my typical net surfing I found a IL hack to export method calls from .Net assemblies and expose them as Unmanaged references.  The handy part about this it you can use the exports anywhere you may call unmanaged interfaces.  The need for me w... [More]

Tags: , , , , ,

Programming

Hello BlogEngine.Net, Goodbye Wordpress

by Mwwhited 29. September 2009 23:11
I have migrated my blog from WordPress to BlogEngine.Net.  The biggest issue was a hack to support any links to the previous ?p={wordpressid} URL that was supported on the site.  I still have a little more house keeping to be back to 100% of where I was but so far I am happy.  I have no I’ll will towards WordPress I just wanted to have my blog platform match my framework of choice. If anyone is interested in the cross reference code I wrote  please feel free to contact... [More]

Tags:

General

Strong Name Unsigned Assemblies

by Mwwhited 16. September 2009 11:09
Some times when you have create .Net applications you get carried away and get them in production without signing them with a Strong Name Key.  This may not be an issue at first but can really limit the security later when you try to deploy the app to more locations. Part of the security in .Net is from the Code Access Security and a very important part of that is Strong Named assemblies. If you get far enough along you might not be sure what version of source code is currently in produ... [More]

Tags: , , , , , , ,

Generic Control Builder in ASP.Net

by Mwwhited 29. August 2009 12:08
In response to a question on StackOverFlow I posted a response about possibly using the ControlBuilder class in ASP.Net to get around the lack of generic control support in the ASP.Net designer.  While it may be possible to use the ControlBuilder to dynamically generate controls based on inputs.  Having it work as simply as a generic wrapper seem like it will require a pretty in-depth dive in reflection and the ASP.Net control model.  Because the person asking the question was pri... [More]

Tags: , ,

Programming

Invoking Generic Methods using Reflection

by Mwwhited 11. August 2009 10:08
Using reflection to create classes and invoke methods can be tricky. Worse still can when you try to invoke methods with generic arguments. This is a short and quick example static void Main(string[] args) { var flags = BindingFlags.Static | BindingFlags.NonPublic; var t = typeof(Program); var mi = t.GetMethod("Loopback", flags); var gargs = mi.GetGenericArguments(); var pargs = new object[] {"input value"}; var gargIn = pargs.Select(a =&g... [More]

Tags: , ,

Programming

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

RecentPosts

Badges