How to authenticate access to a directory in classic ASP

0

I have a system made in classic asp and inside its structure I own a videos folder. Is there any way to authenticate access to this folder?

I researched some forms using web.config, but I was not successful!

    
asked by anonymous 18.08.2016 / 18:40

1 answer

0

Uses a session. Example, right after login:

Session("temPermissao") = "sim"

And in the page that lists the videos you check if it has permission:

if Session("temPermissao") = "sim" then
  (tudo o que o usuário puder ver vc coloca aqui)
else    
  response.redirect("apaginaquevocequiser.asp") 'Se não tem permissão redireciona o usuário para uma página qualquer
end if

So each logged in user will have this session created with a certain value

    
22.08.2016 / 20:54