March 2005 - Posts

31 March 2005
Using an HttpHandler to Forward Requests to a New Domain
One of the hardships of moving to a new domain is intercepting and forwarding traffic from the old domain name over to the new one (without losing any traffic/google ranking/etc). Custom HttpHandlers in .Net make this scenario ridiculously easy to overcome. Pre-.Net, you would have had to roll your own ISAPI filter (in C++ no less) to accomplish something this seemingly trivial (though there is probably lots of pre-rolled code floating around out there, and more than likely some pre-baked turnkey 3rd party solutions as well). Anyone who’s worked with custom ISAPI stuff knows that it has a habit of making trivial stuff not so trivial anymore…it’s a total PITA. Enter the IHttpHandler interface, which in my opinion makes ASP.NET one of the most powerful web frameworks out there in how easy it allows developers to write their own IIS Http Handlers. I’ve utilized it quite a bit in my development forrays, and it hasn’t failed me yet. In this specific case (migrating from zerotrilogy.gotdns.com... Read More...
31 March 2005
jayBlog is Moving -- Update Your Links/RSS Feeds to JaysonKnight.com
I am finally ready to flip the switch on JaysonKnight.com and have completed all the necessary dirty work to do so (I think/hope). I am also migrating to Community Server in the process…yes, originally I said that I would not but I changed my mind (might as well get it all done at the same time), mainly because of the search feature in CS. Old links will work; I’ve written some code to properly redirect requests from zerotrilogy.gotdns.com over to jaysonknight.com. My blog will be located at JaysonKnight.com/blog (RSS is at JaysonKnight.com/blog/rss.aspx). I’ll skin CS whenever I’ve got some time, but for now the homepage will be the generic CS one. I will leave the zerotrilogy address up for a while, though everything should redirect correctly over to my new site whenever a request is made. I can finally mark this off my list of things to do. Thank god it’s done. Sidenote: Feel free to sign up for membership on CS…it’ll enable such things as... Read More...
31 March 2005
Hello From JaysonKnight.com/Community Server 1.0!
It's been a long day, but I have finally moved everything over to JaysonKnight.com (and over to Community Server 1.0). I've written code to automatically forward all HTTP/RSS requests for the old domain to the appropriate page on my new domain (and it's working better than I thought it would; any RSS subscribers will have duplicates of my last 20 or so posts :-)), but that's still no excuse to not update any links you have to my old domain as invariably I will turn the zerotrilogy.gotdns.com site off within the next week or so. I'll also post the code I wrote to forward all requests to the new domain (implementing IHttpHandler made it incredibly simple) in a future post. Enjoy the new site...and if you encounter any exceptions/strangeness please drop me a line so I can fix it. I also recommend getting yourself an account in CS; I promise I won't sell your email address to anyone (unless the price is right...split it with you?). Cheers. Read More...
27 March 2005
Coder Turned Courier (and I don't mean the font)
Here’s a great commentary piece about a coder who got out of cubeland and onto a bike as a courier. Long, but a great read. Besides skiing, cycling is my absolute favorite sport. Unfortunately, I haven’t owned a bike in years…I had a fantastic Cannondale for a while; like an idiot I self-locked it one day and someone (I’m assuming) drove off with it. I actually used to race competitively many many moons ago when I was a young teenager…never won a race but was usually not too far back. It was more for the fun of it than anything else. The author is indeed correct though, it’s not if , it’s when you will wreck or be hit by a car (or as I’ve done on several occasions, peddle into the back of a parked car by not paying attention). I have some crazy stories about crashes I’ve survived, and it still amazes me that I’ve never broken a bone while riding (maybe I’m made out of tupperware, who knows). Actually, I’ve never broken a bone period, but that’s another post. The funniest (if you can say... Read More...
26 March 2005
Incredible Desktop Shots
Go check out the pictures on this site (requires Flash). Very nice stuff. via Roy Osherove . Read More...
26 March 2005
Gizoogle Yo B to the L to the izog
This really made my morning . Read More...
26 March 2005
Managed Palindrome Code -- Update
I’ve refactored my C# palindrome code (yeah, was a little bored) to be even quicker than my previous solution (as well as being a standalon class). I’ve posted my new code here . It does a billion iterations in ~1 minute (2.0ghz proc, 1gig RAM on v1.1 of .Net). Anyone got a quicker algorithm? Bring it on. Read More...
26 March 2005
Adding System Uptime to .Text
Want to show off how long your .Text web server has been up and running (time since the last machine reboot) on your .Text header (in the blog stats section)? Here’s how: Add the following code to your [skin name] \Controls\BlogStats.ascx file: [asp:Literal ID="SystemUptime" Runat = "server" /] (use wickets instead of brackets of course). To your DotText.Framework\Data\DataHelper.cs file: using System.Diagnostics; public static BlogConfig LoadConfigData(IDataReader reader) {... PerformanceCounter pc = new PerformanceCounter( "System" , "System Up Time" ); pc.NextValue(); To your Dottext.Framework\Configuration\BlogConfig.cs file: private TimeSpan _systemUptime; public TimeSpan SystemUptime { get { return this ._systemUptime;} set { this ._systemUptime = value ;} } And finally, to your DottextWeb\UI\Controls\BlogStats.cs file: protected System.Web.UI.WebControls.Literal SystemUptime; protected override void OnLoad(EventArgs e) {... SystemUptime.Text = string .Format( "{0}d {1}h {2... Read More...
25 March 2005
Looking for Some New Blogs
What’s the coolest/neatest/most informative blog you read (besides your own of course)? They don’t have to be technical in nature, though of course that’s always nice. Send me your links! For the record, the blogs I can’t live without are (in no particular order): Raymond Chen (even though I usually have no idea what he’s talking about…he’s about as brilliant as they come though, and the comments are always nice and well thought out). Cyrus' Blather (nice blend of tech and humor). The DailyWTF (go subscribe now!). Don Box . Bring it on! Sidenote: I have finally had to unsubscribe from Scoble (not gonna link…should I even have to?), the s/n ratio on his blog is just too high, plus I’m not a fan of metablogging. Sorry Scoble. Read More...
Filed under:
25 March 2005
ASP.NET Validation Controls in Firefox
I actually figured this out with Bob a while back, but just to reiterate, the following code can get client side validation controls to work correctly in Firefox (or you can always do server side validation at the expense of postbacks): C# Page.Validate(); if ( !Page.IsValid ) { return ; } //Continue Your code VB.NET Page.Validate() If Not Page.IsValid Then Return End If 'Continue Your code Via Sushila Patel . Read More...
More Posts Next page »