[thelist] RE: IIS 5: Is it Bad to Map .css to asp.dll?

Andy Waite Andy.Waite at company-net.com
Thu May 17 13:15:31 CDT 2001

>From: "James Aylard" <webmaster at equilon-mrc.com>
>    I am not certain whether this is strictly an IIS question, since I
>suspect the same thing can be accomplished through other means 
>on other web
>server platforms and other server-side scripting languages. 
>But a partially
>formed thought occurred to me: what if I mapped .css files to 
>the asp.dll in
>IIS -- can I include ASP code in a stand-alone CSS file to 
>create a client-side style sheet?
>    Lo and behold, the answer is, yes, I can! In theory 
>(remember, this is
>based on a partially formed thought), this would seem to 
>provide some neat
>benefits, especially for cross-browser CSS.
>    But the question occurs to me: are there pitfalls, from a 
>admin standpoint, to doing this? Security issues? Unintended 
>    Caveat: I am not a server admin, and don't pretend to be.
>    Enlightenment, anyone? :)
>James Aylard

I just rename my CSS file so that the extension is .css.asp. I should
probably also be setting the ContentType but it seems to work without doing

I can't see why there'd be any security risks over and over normal ASP

The downfall is that if you have an error in your ASP within the CSS file,
you won't see the error, only your page without the styles applied.

Andy Waite <andy.waite at company-net.com>
Database Web Developer
Company Net <http://www.company-net.com>
Tel: +44 (0)131 559 7500 Fax: +44 (0)131 559 7501

More information about the thelist mailing list