csshandler does not seem to work

Mar 20, 2008 at 5:38 PM
I have .NET 3.5 framework. I've added the csshandler.dll using the "add existing item" I added the line to the web.config file, and added the variables to the .css file. Could it be a framework issue?
Mar 20, 2008 at 5:45 PM
I guess I didn't mention that it isn't working ;) Thanks!

JennyQuinn wrote:
I have .NET 3.5 framework. I've added the csshandler.dll using the "add existing item" I added the line to the web.config file, and added the variables to the .css file. Could it be a framework issue?

Coordinator
Mar 20, 2008 at 8:21 PM
Jenny,
You probably need to register the .css extension with asp.net, so that it knows how to process it:

1) In IIS, do a right click | Properties on the web site (or virtual directory) you want to enable
2) Click the "configuration" button (on the "home directory" or "virtual directory" tab)
3) Under "Mappings" scroll through the list. If ".css" is not listed, then add it. Limit the verbs to "GET", and set the executable to the full path of your aspnet_isapi.dll. Mine is (for v2.0 of the framework):
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

yours should be similar.

HTH,
Gabe
Mar 21, 2008 at 1:53 PM
Gabe,
Thank you so much Gabe, and thanks also to Troy and Rory. It works like a charm, and it's perfect for what I need.
Jenny
Apr 23, 2008 at 8:33 PM
Help! I built this on my dev server and it worked after registering with IIS. Then I deployed to my live site, and it doesn't seem to be observing the style sheets even though I registered .css with IIS. The biggest difference on these two environments is that it is a virtual directory on the development and is a full site on the production server. Also I built it on the other machines it works on and it was just copied to this machine. I checked and the csshandler.dll is in the bin directory of the site. Any suggestions? Thanks!
Apr 23, 2008 at 9:16 PM
I realized that I didn't update my web.config. Sorry to bother you. Have a good day :)
Dec 2, 2009 at 11:59 AM

maybe you guys can change the mainpage to note that IIS needs to send .css files to the csshandler. I think there is more people with this problem (i for example ;))