BoredOfBinary
BoredOfBinary

Reputation: 863

Custom file extensions IIS7

I need to create a custom file extension for asp.net, "home.file"... In IIS6, its pretty straight forward but I cannot find any documentation that will tell me how to do this in IIS7. I tried a Script Handler Mapping to map the ISPAPI.dll but it doesn't seem to redirect to the .net process because I cannot seem to attach to the process. Any ideas?

Upvotes: 0

Views: 1028

Answers (1)

chris166
chris166

Reputation: 4807

There are 2 modes in IIS7. The integrated pipeline and the classic pipeline. The classic pipeline should behave identical to IIS6, so you could try it with that one. In the integrated pipeline, every request (even to static images, css and so on) goes through the managed pipeline and can be intercepted with HttpHandlers.

If you use ASP.NET MVC, you could solve your problem very easily, just create a route similar to {controller}/{action}.file/{id}

Upvotes: 1

Related Questions