[ASP.NET 1.0]在web config寫權限

看板Visual_Basic作者 (小雨)時間19年前 (2006/08/11 18:20), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我是用form-based權限 而使用者角色有:路人、一般會員、廠商會員、管理者 現在是所有form都在同一個檔案資料夾裡 下面是在msdn找有關權限的資料 ======================================= 下列範例允許會員角色的使用者檢視名為 memberPages 之資料夾中的頁面,但是拒絕不 是會員角色的使用者來存取: <configuration> <location path="memberPages"> Q1 <system.web> <authorization> <allow roles="members" /> Q2 <deny users="*" /> </authorization> </system.web> </location> <!-- other configuration settings here --> <configuration> ======================================= Q1:所以要區分會員角色的存取,例如一般會員的會員中心 就要另外在檔案所屬的資料夾裡另建一個"memberPages"的資料夾, 把"一般會員"專屬的頁面(memberCenter.aspx和memberCenter.aspx.vb …) 移到該資料夾嗎? Q2:roles="members",members這個角色名稱怎麼來的?是依據資料庫裡的欄位嗎? 煩請解惑,感恩 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.73.201.91
文章代碼(AID): #14t5drgx (Visual_Basic)
文章代碼(AID): #14t5drgx (Visual_Basic)