My Monday morning WTF comes from IIS7 on Windows 7. I recently installed Coldfusion9 on this machine which has a handful of existing ASP.NET 3.5 web applications. The problem I ran into came after installing Coldfusion9 and electing to configure all IIS websites to work with CF. While that is convenient, it ended up breaking one of my ASP.NET applications that was using ASP Validation controls on a login form. Now that things are figured out, here are the details.
Firing up my ASP.NET application gives me the error message :
The WebResource.axd handler must be registered in the configuration to process this request

WebResource.axd handler must be registered
Obviously all I could think is WTF?!?!? since this application worked on Friday and now it is broken. The first thing I want to point out is that in my situation, the suggested solution of mapping WebResource.axd in the httpHandlers section of my web.config did not help this problem. After some googling I cam across this post on the IIS.NET forums which put me on the right track. You can read the details there if you want a good background on MS’ response and other users running CF and ASP.NET on the same box.
I’m happy to say I have three workarounds for this issue. Hopefully these will help you as well.
1. Change your AppPool to run in Classic Mode
- In inetmgr, put your web application into it’s own Application Pool ( unless it’s already in it’s own pool )
- Change that AppPool’s Managed pipeline mode to “Classic”
- You should be good to go

Classic mode is for compatibility ( think IIS6 )
2. Stop using ASP Validation controls
All ASP.NET Validation controls are hosted by WebResource.axd. If you stop using ASP Validator controls, the server will stop asking for WebResource.axd.

Removing ASP Validator controls should remove this error
3. Remove Coldfusion handler mappings from your ASP.NET site
If your ASP.NET app isn’t using Coldfusion, I would suggest doing this as your solution. Even if you do need Coldfusion in your ASP.NET app, you could still host your CF app in it’s own Virtual Directory and request if via ASP.NET.
- Open inetmgr
- Select your web app on the left ( under Default Web Site )
- In Features View on the right, double click Handler Mappings
- Sort your Handler Mappings by Name, and remove all entries titled “AboMapperCustom-*”
- Now your ASP.NET should work like a champ.

IIS7 Handler Mappings

Coldfusion9 Handler Mappings
Monday WTF solved. Now to get back to pushing buttons.
Tags: asp.net, coldfusion, iis7, inetmgr, web.config, webresource.axd
Posted in .net, adobe, coldfusion, development, microsoft, tips and tricks, windows | No Comments »
One of my all time favorite features of MSSQL 2005+ is being able to create table variables on the fly from SELECT statements. This isn’t a lesson in what table variables are, but here is an easy sample in case this is a new concept.
Running this query
SELECT * INTO #myTableVar FROM YourTable
Gives you a new table variable named myTableVar. Table variables are scoped to the active connection, so running this will work.
// make table var
SELECT * INTO #myTableVar FROM YourTable
// show me the data
SELECT * FROM #myTableVar
// you can drop it if you wish
DROP TABLE #myTableVar
However, let’s say you have an aspx page or a sproc that runs this query.
SELECT * INTO #myTableVar FROM YourTable
You can not access myTableVar in a separate connection to the database because as soon as the first query’s connection closes, myTableVar gets dropped. Here are a few other scenarios that also demonstrate the scoping of a table variable.
-- FAILS
EXEC ('SELECT * INTO #tmp FROM MyTable;');
-- #tmp does not exist
SELECT * FROM #tmp

Table variable #tmp lives inside of EXEC
Here we see that the table variable #tmp only lives for the life of the statement inside of EXEC. The second SELECT * calls is outside of the EXEC statement.
-- #tmp2 works inside of EXEC statement
EXEC ('SELECT * INTO #tmp2 FROM MyTable; SELECT * FROM #tmp2');

What happens in EXEC, stays in EXEC
Here #tmp2 works because it’s being used inside of the EXEC statement. This is worth knowing if you work with dynamic sql statements and exec.
-- works!
SELECT * INTO #tmp FROM MyTable;
-- #tmp exists
SELECT * FROM #tmp

typical sample of using mssql table variable
This is a typical example that you may use inside a sproc, trigger, script, etc. Both sql calls live in the same space, so #tmp exists.
Tags: exec, mssql, mssql2000, mssql2005, scope, SELECT INTO, table variable, temp table, tsql
Posted in database, development, random, tsql | No Comments »
Wanted to share this since it gave me so much trouble figuring out. It’s a simple SQL query ported to LINQ to SQL that joins two tables to return a filtered listed of data.
Here are the tables from my schema

Here is a basic SQL statement I could fire to retrieve my user videos.
select *
from video v, user_videos uv
where v.vid = uv.vid
and uv.uid = 2

Here is how you would run the same query using .net’s LINQ to SQL.
// create DB connection
var db = new DBCONN();
// run query
List<video> uvids = (
from c in db.video
join o in db.user_videos
on c.vid equals o.vid
where o.uid == 2
select c
).ToList();
This query differs slightly from the screenshot below because I used it in a WCF Service.

The variable DBCONN is my database connection that I established when mapping my DB. If you are not familiar with how to set this up, use the Visual Studio’s “Add the ADO.NET Entity Data Model” wizard. With your .net project open, right click your project, left click on “Add the ADO.NET Entity Data Model”. This wizard will walk you through setting up everything you need to setup your DB model file ( edmx ), as well as setting up your database connection and saving it in web.config.
Jesse Liberty did a simple tutorial that uses this wizard in a WCF service application.
I hope this helps somebody out.
Tags: asp.net, join, linq, linq to sql, linqtosql, query, sql
Posted in .net, C#, database, development, microsoft, sql, tips and tricks | No Comments »
Chat is @ Thursday Feb 11th, 11:30am MST
Jun Heider and myself will be talking to the 360|Flex guys tomorrow about our session. It’s actually going to be a back-to-back mega session comparing the latest and greatest on both the Flash Platform and the Silverlight Platform.
Come check it out and feel free to ask questions…although for the good stuff you’ll have to wait until our talks. 
Here’s the full details: http://www.360flex.com/blog/2010/02/360flex-speaker-chat-eric-fickes-and-jun-heider/
I hope to see you online tomorrow or at 360 Flex in March.

I'm speaking at 360 Flex 2010
Tags: 360flex, adobe, adobeconnect, chat, conference, flex, jun heider, speaker
Posted in .net, C#, adobe, coldfusion, database, development, flex, flexbuilder | No Comments »