Blog Archives

Slick inline trace logging in ASP.NET

I’m going to show you a slick way to configure log4net to your trace log, and then make it extremely simple to view the trace log for a page while viewing that page. Ultimately, we’ll end up with something that

Cloud Computing (and Azure) – Right for your site?

Everyone seems to be getting excited lately about the prospect of cloud computing. Just like many others, I get excited by the idea that I wouldn’t have to worry about adding servers to scale up. Theoretically, a guy (or girl)

ASP.NET MVC Pro’s and Con’s

In our current iteration of improving our software development strategy, ASP.NET WebForms simply doesn’t fit in with the new demands of being unit testable and flexible. It comes as no surprise that ASP.NET MVC has been getting all the headlines

Detecting mobile device user agents in ASP.NET

If you’re developing a mobile version of your website, usability should be one of your top priorities. Most sites will detect if you’re using a mobile device, and automatically redirect you to the mobile version. I’m going to show you

Response.Redirect and Output Caching Trouble

I ran into an interesting issue with output caching. If you have a page that uses output caching and that page conditionally sends a redirect response, you need to be careful. Let’s say that you have a page that redirects

Removing duplicate page addresses in MVC

As I mentioned before, there are a couple of SEO issues with MVC. I’ll discuss two ways to get around the trailing slash issue. Recall what the issue was. MVC will happily serve up your URL’s both with and without

ASP.NET MVC, What about SEO?

I’ve started working the the latest preview of the ASP.NET MVC framework. I’m completely converting one of my sites, because learning by doing is typically the best way. Unfortunately, I’ve run into some alarming SEO (Search Engine Optimization) issues with

ASP.NET Changing Session ID’s for each request

I ran into an issue where ASP.NET was changing the Session.SessionId for every request from the same user. A quick Google search revealed 2.3 million pages. I’ll summarize one of the main reasons this can happen, and discuss 2 ways

Locking sessions for multi-threaded access

I recently ran into a situation where I needed to upload some small files from a Flex client application to an ASP.NET web server. I decided to store the uploaded files in the users session while they were in the

Object does not match target type in GridView

I created a shopping cart for a website that can display multiple types of items that implement IShoppingCartItem. When the GridView would display items that were different type, I would get this exception: Exception Details: System.Reflection.TargetException: Object does not match