RE: Files(html) in folder permission in ASP.NET

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



You can try the old session asp way, it might be simpler. The way i do it in
asp is

security.asp
IF NOT AUTHENTICATED THEN
PAGE.REDIRECT to login.asp

login.asp
IF username AND password are correct THEN
Session("AUTHENTICATED")=TRUE

secure_page_1.asp
<!--#include file="security.asp"-->

secure_page_2.asp
<!--#include file="security.asp"-->
......

Now if they try to go directly to any of the secure pages they will be
redirected to the login screen as the session variable will not be set.
I like that because if i want to make some code available in all the pages i
put it in security.asp



"VK" wrote:

> Hello:
>
> This is an ASP.NET app - once user logs in using username and password
> (kind of hard coded, since it is temporary solution) they have access to
> a series of html files. What happens is that these html files are
> accessible even without logging by trying in the url directly.
>
> Is there a way to secure this folders, since these different html will
> be in multiple folders?
>
> I cannot use forms authentication since we have current website set up
> as Windows auth.
>
> Many thanks for your time.
>
> *** Sent via Developersdex http://www.developersdex.com ***
>
.



Relevant Pages

  • Re: Form authentication and html files
    ... pages be protected by the authentication system too. ... The accessing of html files need to be authenticated in my local system. ... <!-- This section gives the unauthenticated user access to all of the files ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Password protected html files
    ... redirected to the login page set in forms authentication even when I accessed ... He will create html files, ... html pages are dumped to the folder. ... to protect access to some HTML files in your website, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Password protected html files
    ... He will create html files, ... I create a form authentication app in securehtmls/. ... to protect access to some HTML files in your website, ... special folders like App_Data etc or you go through some trouble ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Password protected html files
    ... static resources being served directly when the virtual folder has forms ... redirected to the login page set in forms authentication even when I ... web.config and had IIS 6.0 virtual directory setup as an IIS application. ... He will create html files, ...
    (microsoft.public.dotnet.framework.aspnet)