如何建立受密码保护的目录 [英] How to make a password protected directory

查看:87
本文介绍了如何建立受密码保护的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我在ftp服务器上有我的网站.有一个其中包含重要文件的文件夹.我想对此文件夹设置密码保护.我有一些步骤可以做到这一点,但是在托管控制面板上就可以做到这一点.现在,我想在运行时访问该文件夹,以便可以从中复制选择的数据并将其粘贴到另一个目录中.

我确信通过此方法可以实现安全性,但不确定这是否可行以及如何实现?

谢谢,

Dear all,

I have my website on ftp server. There is a folder which has important file within it. I want to make this folder password protected. I got some steps to make this but its at hosted control panel. Now I want to access that same folder at run-time so that I can copy the selective data from it and paste it into another directory.

I am sure through this I can achieve security but not sure whether this is possible and how?

Thanks,

推荐答案

好,我明白了:)

在web.config中

OK , i get the point :)

In web.config

<?xml version="1.0" encoding="UTF-8"?>
 <configuration>
   <system.web>
     <customErrors mode="Off">
     </customErrors>

==这是解决方案==

== Here is the solution ==

<authentication mode="Forms">

==这是常见的方式,但是您也可以使用HTML(JS)==

== It''s the common way but you can also use HTML (JS) ==

<forms name=".ASPXAUTH" loginUrl="login.aspx" protection="All" timeout="999999">
        <credentials passwordFormat="MD5">

==登录名和密码==

== Login and Password ==

<user name="admin" password="21232F297A57A5A743894A0E4A801FC3" />
       </credentials>
     </forms>
   </authentication>
   <authorization>

==在这里您设置什么样的组或每个用户==

== Here you set the what kind of group or each user ==

<allow users="?" />
      <allow users="*" />
    </authorization>
    <trace enabled="true" localOnly="false" />
  </system.web>

==位置(该文件夹称为管理)

== Location ( the folder is called administration )

<location path="administration">
    <system.web>
      <authorization>

==在这里您设置什么样的组或每个用户==

== Here you set the what kind of group or each user ==

<allow users="admin" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>
</configuration>


这篇关于如何建立受密码保护的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆