<< Return to Main Articles Page

Most Popular Articles

Articles by Topic

A Home Builders Opinion Air Conditioning Tips Beachfront Houseplans building lots bungalow Cape Cod House Plans Color Schemes Contemporary Style country house plans craftsman house plans Curb Appeal Custom vs Stock House Plans Do-It-Yourself Dream Homes Engineering House Plans european house plans Exterior Materials Feng Shui Floorplan Layout Frank Lloyd Wright French Country Home Design Garage Plans Garages green design Home Builders Home Designers Homebuilding activity homeplans house plan styles house plans Housing Market Indoor Gyms in-law suites Jake England Landscaping Log Cabins luxury home plans Mediterranean Homeplans modern home plans Modifications Mortgages Mountain House Plans National Association of Home Builders Passive Solar Design Perfect House Plans Plan Images Prairie Houseplans Ranch House Plans Remodeling

Recent Articles

Why Asp.net Sucks (Tonight)

I have noticed a slight slow down on a few of the pages on the website so I figured that it was time to get in there and turn on some caching. Asp.net, the technology we use, is supposed to make this very simple. All you have to do is something like this:

<%@ OutputCache Duration="600" VaryByParam="none" %>

Then magic happens and your page is magically stored in memory and millions of people can view it at the same time. The problem is that every page on The Plan Collection contains a login control. It is the little piece of code in the upper right. If you turn on caching guess what happens. The first person to login and view a page gets their user account broadcast to everyone else that sees that page. That's right the designers of the LoginView Asp.net control were so short sighted that they didn't realize that that control should NEVER be cached.

There are other problems with caching in asp.net as well including a lovely problem with the varybycustom parameter when you do cross page posting. The fun part of that is that if you set the parameter in page one then post to page two where a second varybycustom parameter is set the framework coughs, sputters and throws an exception letting you know that the parameter has already been set. How about this guys. Instead of throwing an exception vary by two parameters?

Don't worry this code never made it to production. I am once again going to go in and deal with the caching programatically so that site will get a boost. However, it is frustrating when 'enterprise' frameworks like asp.net fail you in terrible ways. Come on guys even though you are Microsoft and the world is accustomed to being let down by you, you can do better.

Comments:

Leave a Comment:

You must be signed in to add a comment

Related Articles