Custom Errors in IIS7

Having recently moved over to IIS7, one of my stumbling blocks has been around custom errors. This works really well in IIS6, but as soon as you move over to IIS7 seems to completely stop working in most cases. Requests to folders or files without .aspx extensions seems to just throw a Server Error This was less than ideal, so I set out to find out the right way to do this in IIS7.

Disable button on post back – working with validators

In the past I’ve written a post on how to disable a button on post back:

Disable button on past back

This works really nicely, until you try use this with ASP.NET Validators.

ASP.NET Website working within a frame

I recently was tasked with creating an ASP.NET Website that will run within a Frame on another domain. Not realising the inherent problem with this method, I set about happily creating a website as I normally do oblivious to the impending problems about to be uncovered. In development my website worked as expected, passed QA testing and was on it’s way up to production where it would finally be placed inside it’s frame for use.

GamerLobby syndicatable frame

So we had a little experiment on the GamerLobby to create a frame displaying our matches that could be easily integrated into community sites out there. This is what it looks like:

Creating your own Unhandled Error Logging Module

I'm a big fan of the ELMAH project which I utilise in my personal website GamerLobby.net This is great for plugging into an existing website to catch unhandled exceptions, but not ideal when you want to log to an existing infrastructure. So I set of on the task to create my own custom unhandled error logging module, and this is what I came up with.

HttpModules - Why using HttpApplication is a bad idea

I was using Darksider's page optimisation module to clean up and optimise my sites HTML gamerlobby.net This was working like an absolute champ up until the night I decided to go live. Leaving ELMAH for the last minute as it was so darn easy to implement, I started to struggle to get it to start logging. It made no sense. Database created, Connection String present and correct, modules and handlers referenced. WHAT CAN IT BE.

Organising that jungle of cables you're hoarding

Several times I've seen these shows on TV about hoarders. That seem like really sad people who don't know when to get rid of something, and I pity them.

So recently I moved house, and to my shocking surprise realised that I was in fact a hoarder to some extent. Darn it!! I am one of those people. Well, I guess we are all to some extent. This brings me to the post.

ServerVariables empty unless Debug

Just had a really strange issue where I'm trying to log some ServerVariables when an error occurs. The bug was when I ran the code without debugging, no ServerVariables were being logged. If I went into Debug, and hovered my mouse over the ServerVariables variable, it had all the information I was looking for. After that, it logged everything fine.

Disable button on post back

Often post backs can take some time, and it appears to a user as if the browser is not responding causing the user to click the button multiple times. In ASP.NET it is most simple to disable a button on click, and still post back to the page. Here is how we can do this with an ASP.NET button.

ASP.NET Custom Error not throwing 404

So I had an issue with Google the other day when I noticed my site was no longer verified.
So I went through the general process of verifying but Google complained that it was not seeing a 404 with the following message

We've detected that your 404 (file not found) error page returns a status of 200 (Success) in the header

«July»
SunMonTueWedThuFriSat
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234