问题
I have a .net application I want to respond to .htm and .html requests (in addition to .aspx). I know how to do this in IIS6, but not in IIS7. Someone please enlighten me!
Thanks,
Kyle
回答1:
Handler Mappings
Click 'Add Script Map' on the right
Then:
Request path: "*.html"
Executable: "%windir%\Microsoft.NET\Framework\v2.0.5 0727\aspnet_isapi.dll"
Name: "YOURNAME"
have you tried classic mode?
回答2:
What do you mean when you say you want this application to "handle" .html files? What do you expect it to do? Run HttpModules? Do you have your own handler?
Because IIS7 has integrated the ASP.NET pipeline. The IIS7 pipeline is now the same as the ASP.NET pipeline. I'm not sure there's anything special you need to do anymore.
来源:https://stackoverflow.com/questions/890814/what-is-the-proper-way-to-map-html-to-the-asp-net-pipeline-in-iis7