views:

54

answers:

1

In my ASP.NET MVC application the ASP.NET pipeline is being invoked for static files (such as css and javascript files). This shouldn't be happening, right? (I mean, what's the point in processing them?).

Maybe I'm completely wrong here, and ASP.NET should be processing these files - If so please let me know!

Otherwise, What's the best practice for setting up IIS or ASP.NET MVC so that these files are just spat out rather than processed by ASP.NET? (Only problem I can think of it possibly route handling)

Thanks

UPDATE

Currently I'm serving from the ASP.NET development server, so would like to know options regarding this, but also for IIS6 and 7 if possible.

+3  A: 

The Visual Studio development server uses the ASP.NET pipeline to handle all requests including javascript and css. This is not the case for IIS unless explicitly configured.

Darin Dimitrov
Ah, I didn't know that - thanks.
UpTheCreek
To add clarification: The VS Dev Server uses the ASP.NET Hosting API's to create the Web Server; so naturally all requests are handled by ASP.NET. IIS on the other hand doesn't require ASP.NET to function, and knows how to serve up files without using the ASP.NET Hosting API's.
Chris Pietschmann