Asp.net force https on some files
In asp.net 4 I want to force https on some files, and then revert back to http on the rest of the website. With my hostin开发者_运维技巧g company I can use .htaccess and mod_rewrite but I've also seen various other methods suggested from creating classes to inherit the page from to the UrlRewriter httpModule.
Are there any particular advantages/disadvantages or is there a new built in method in .net4 that I have not found yet?
in my experience, doing something like enforcing https is usually best done via the web server. You can create httpModules to do it, but configuring IIS would be better.
IIS 7 may have the ability to do this better, as you can filter files, folders etc in it.
This project automatically switched some pages to https and is driven by lists in the web.config. http://code.google.com/p/securityswitch/
精彩评论