TAILIEUCHUNG - ASP.NET 4 Unleased - p 126

Ủy quyền của tập tin Địa điểm Theo mặc định, các quy tắc cho phép được áp dụng cho tất cả các trang trong một thư mục và tất cả các thư mục con. Tuy nhiên, bạn cũng có tùy chọn sử dụng các yếu tố vị trí với các yếu tố uỷ quyền. | 1224 CHAPTER 27 Using Membership Authorizing Files by Location By default authorization rules are applied to all pages in a folder and all subfolders. However you also have the option of using the location element with the authorization element. The location element enables you to apply a set of authorization rules to a folder or page at a particular path. For example imagine that you want to password-protect one and only one page in a folder. In that case you can use the location element to specify the path of the single page. The web configuration file in Listing password-protects a page named . LISTING Protecting a File xml version configuration authentication mode Forms location path authorization deny users authorization location configuration You also can use the location element to apply configuration settings to a particular subfolder. For example the web configuration file in Listing password-protects a folder named SecretFiles. LISTING Protecting a Folder xml version configuration authentication mode Forms location path SecretFiles From the Library of Wow eBook Configuring Authorization 1225 authorization deny users authorization location configuration Using Authorization with Images and Other File Types Authorization rules are applied only to files mapped into the Framework. The Visual Web Developer web server maps all file types to Framework. Internet Information Server on the other hand maps only particular file types to Framework. If you use Internet Information Services and you add an image to a password-protected folder users aren t blocked from requesting the image. By default authorization rules apply only to file types such as pages. Files such as images Microsoft Word documents and classic ASP pages are ignored by Framework. If

TÀI LIỆU MỚI ĐĂNG
2    3    0    10-08-2020
3    4    0    10-08-2020
1    6    0    10-08-2020
2    2    0    10-08-2020