RE: HTML file server side includes plus forms authentication



Will,

how about this:
1. Rename your .html files to .aspx
2. For the .html hyperlinks generated by your DLL you write an HTTP Handler
that does an URL rewrite from .html to .aspx.
For example this is what happens when you click on
http://www.dotnet42.com/NG_microsoft.public.dotnet.framework.drawing/A_605/T
hreadDetail.htm


Alex

http://www.DotNet42.com - The Answer to Your DotNet Question


"William F. Zachmann" wrote:

> We've got a project going that involves moving an old web site with a
> massive dll written in C++ that produces most of the output from a SQL 7.0
> data base on NT4 onto IIS on Windows 2003 Server with SQL 2000. All new
> code is being written in C# using ASP.NET and we are using forms
> authentication to control access to particular directories/applications.
>
> We are having a hard time figuring out how to configure the thing so that
> existing html files both a) have access controlled through ASP.NET forms
> authentication and b) render server side includes correctly. If we
> configure the htm/html files for the application on IIS to be handled by
> ssinc.dll the includes are rendered correctly, but access is not restricted
> by forms authentication. If we configure them to be handled by
> aspnet_isapi.dll we get forms authentication control, but the includes are
> ignored.
>
> Oddly, simply renaming a file from *.html to *.aspx with no other changes
> results in aspnet_isapi.dll handling it correctly -- providing forms
> authentication access control and also rendering includes correctly. But if
> the file name is *.htm or *.html, aspnet_isapi.dll fails to include the
> includes. It almost seems like this is a bug! I cannot, at any rate, see
> any reason why it would do this by design.
>
> So, in theory, we could solve the problem by just re-naming all our htm/html
> files with an aspx extension instead. Unfortunately this is not so easily
> done in practice since the old C++ .dll that creates most pages and fills
> them with stuff from the data base has hyperlinks to the *.html files hard
> coded into it all over the place. It is not impossible to change this, but
> we'd like to find a simpler way.
>
> Can anyone offer a suggestion for a way to resolve this problem? Is it
> simply a bug that aspnet_isapi.dll renders includes for *.aspx files but
> fails to do so for an otherwise identical files with a .htm or .html
> extension?
>
> All the best,
>
> will
>
> William F. Zachmann, President
> Canopus Research Inc.
> http://www.canopusresearch.com
>
>
>
.



Relevant Pages

  • RE: Protecting Web Files from Direct Access
    ... built-in security of a kind. ... Forms Authentication automatically redirects users who access pages on your ... I'm trying to figure out how to rewrite an HTML ... page so that it performs the function of the HTML whilst being an ASPX page. ...
    (microsoft.public.dotnet.security)
  • Re: Draw Images on fly
    ... An HTML document is pure text. ... Now, my original message said to use an ASPX page, *not* an ASCX UserControl ... and display it,the image is shown but the main page's contenttype turn to ...
    (microsoft.public.dotnet.framework.aspnet)
  • =?iso-8859-1?Q?Re:_Error_Message:__Argument_Not_optional?=
    ... Once I get the bulk of the pages converted each html page will automatically redirect to the corresponding aspx page. ... (email on the web site) ... Chip Pearson wrote: ...
    (microsoft.public.excel.programming)
  • RE: Protecting Web Files from Direct Access
    ... If you want that those files take part in the ASP.NET security infrastructure - you have to make them pass the .NET runtime. ... Forms Authentication automatically redirects users who access pages on your ... every one of the pages has the filename extension ASPX. ... filename extension HTML are not protected. ...
    (microsoft.public.dotnet.security)
  • Re: Error Message: Argument Not optional
    ... of the .html pages that you just can't live with and you'll be updating that, ... Chip Pearson wrote: ... automatically redirect to the corresponding aspx page. ... (email on the web site) ...
    (microsoft.public.excel.programming)

Loading