IIS treating .html pages as .aspx pages
-
-
Hello everyone - I don't know if this is the right place to ask the question, but here is the thing. I want IIS to treat the .html pages as .aspx pages, so I can reduce the size of the pages. How I can do that, any advices? Thanks for your help, Laziale
laziale wrote:
I want IIS to treat the .html pages as .aspx pages, so I can reduce the size of the pages.
:omg: I am not able to understand what you are looking for :confused:. Can you please be more clear ? Thanks !
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Visit My Latest Article : Beginner's Guide : Exploring IIS 6.0 With ASP.NET
-
Hello everyone - I don't know if this is the right place to ask the question, but here is the thing. I want IIS to treat the .html pages as .aspx pages, so I can reduce the size of the pages. How I can do that, any advices? Thanks for your help, Laziale
-
Hello everyone - I don't know if this is the right place to ask the question, but here is the thing. I want IIS to treat the .html pages as .aspx pages, so I can reduce the size of the pages. How I can do that, any advices? Thanks for your help, Laziale
I never tried it with HTMLs but Check by following the process below : Go to IIS console,
Right click on Website
, - > Go toproperties.
Move to Tab Page :Home Directory
Click onConfiguration
. In the Mappings Tab click on "Add". In Executable Choose"aspnet_isapi.dll"
. (You will find this inDefaultDrive:\windows\Microsoft\Framework\2.0
) In the Extension type"html"
Now click OK. In your webconfig of your website, create an entry for HTTPHandler which handles HTML extension. You can use this article to remove extra whitespaces and apply GZip Compression to your html. http://www.codeproject.com/Articles/38067/Compress-Response-and-HTML-WhiteSpace-Remover.aspx[^] Just write the response back to the stream. If HTML extension doesnt work for you, try using any other extensions for your html files, preferably axd. :) Hope this solution help you. :rose:Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.