hidden ASPX behind HTML

  • Thread starter Thread starter Shaul Feldman
  • Start date Start date
S

Shaul Feldman

Hello,
the question is how can I masquerade ASPX files behind HTML extension?
Thank you in advance.
 
Hi,

in IIS add mapping for .html/htm extensions to be processed by
aspnet_isapi.dll (see the setting for .aspx extension to get the idea). This
makes IIS to forward the file processing to ASp.NET. After that you would
need to map the .html extension in ASp.NET config files for proper
HttpHandler (so that ASp.NET itself figures that it needs handling and isn't
static content). In machine.config aspx extension is mapped as follows:

<httpHandlers>
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
</httpHandlers>

And you'd of course add a setting such that path is "*.html" and same
repeated for "*.htm" so that these file types are processed as normal aspx
pages.

Hope this helps.
 
Thanks, the only problem is when I add the new setting for HTML, the OK
button is greyed out :(
What can be done?
 
It is greyd out if the path in the textbox is in short form. After choosing
the aspnet_isapii.dll (so that path is in the textbox), click focus to the
TextBox and then away from it. The path should change to different shape and
OK button to be clickable.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
 
I'm sorry, but something is not right.
I'm doing what you wrote, but nothing works fine.
I choose the dll, in text box I get "C:\WINDOWS\...\aspnet_isapi.dll", fill
in HTML extension in the next TextBox, but the OK button remains grey...
 
Hi,
I did everything as you have meantioned, but unfortunately, the ASPX
extension still remains there...
whe I click to some other page from the main page, I get the extension with
the filename.
Weird... I thought this would work. Any ideas?
 
Back
Top