|
| .html httpHandler isn't able to process .html files. |
 |
Fri, 22 Feb 2008 17:44:52 +000 |
Hi everybody I'm writing an handler to manage .html files. What I want is to
intercept every call made towards html or htm files and check if it exist the
counterpart in aspx. I reached perfectly my goal, but I would like also to
manage the call when the aspx file doesn't exist. The problem starts when, given
an html files that hasn't a correspondance in aspx, I would like to process the
html file as it is, so as static page. Leaving unmanaged this part of work,
results in a blank page output, but if I try to forward the page with a
Server.Execute or Server.Transfer or Response.Redirect, in any case IIS
intercept the new call and forward it to my handler again. Well, this sound
normal, since I had written a .html handler, but how to manage this. In a first
attempt I though to forward my request to the static handler with some c# code.
Nothing that had worked. I then moved through IIS configuration, setting up the
staticfileHandler after mine, believing that it's all what I need. In this way I
got again a blank file. Is there a way to manage this kind of situation? Thanks
in advance. Andrea
|
| Post Reply
|
| Re: .html httpHandler isn't able to process .html files. |
 |
Fri, 22 Feb 2008 20:53:06 +000 |
You need to map the .HTML extension to the ASP.NET ISAPI filter in IIS
|
| Post Reply
|
| Re: .html httpHandler isn't able to process .html files. |
 |
Fri, 22 Feb 2008 21:16:14 +000 |
Why to the ASP.Net ISAPI Filter ... I would like to process normal static html
file. Not aspx pages. I'm able, inside the handler, to correctly redirect to
aspx in case I need. What I'm not able to do is let html page be processed as it
is. Andrea
|
| Post Reply
|
| Re: .html httpHandler isn't able to process .html files. |
 |
Mon, 25 Feb 2008 08:49:58 +000 |
Hi,
You might want to have a look at this thread:
http://forums.asp.net/t/1188310.aspx
|
| Post Reply
|
| Re: .html httpHandler isn't able to process .html files. |
 |
Tue, 26 Feb 2008 16:40:31 +000 |
Zhao
thanks for you reply but this doesn't overcome to my question. Why I should use
the IIS ISAPI filter suggested in the previous reply, and worse than all it
seems to not be able to solve my problem.
Taking the example inside the blog I got redirected, I should add a type
declaration like this
<httpHandlers>
<add verb="*" path="*.html" type="Myclasshandler,
MyAssemblyName"/>
</httpHandlers>
that is what I've setup.
Should I add a second entry just below the first one that redirect *.html files
to the ASP.Net Isapi filter?
Is this what you mean? Or should I add a second type declaration that point to
the asp.net isapi (if this is allowed - I don't know)
Thanks
Andrea
|
| Post Reply
|
|
|
|
|
|
|
|
|
|