ASP.NET Security FAQ: วิธีการ protect non-page file โดยใช้ ASP.NET URL Authorization
-
9 พฤษภาคม 2555 6:06ผู้ดูแลASP.NET Security FAQ: วิธีการ protect non-page file โดยใช้ ASP.NET URL Authorization
Supa Sethasiripong [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
ตอบทั้งหมด
-
9 พฤษภาคม 2555 6:07ผู้ดูแล
1. เปิด IIS manager
2. คลิกขวาที่ web site หรือ virtual directory แล้วเลือก Properties
3. เลือก Directory หรือแท็บ Home Directory
4. จะมีปุ่ม Configuration อยู่ใน Application Settings ให้คลิก
5. Insert Wildcard application maps: คลิก Insert จากนั้นให้ input
“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll”
(ชื่อไฟล์อาจจะไม่เหมือนกัน)6. Restart IIS 6.0
ใน IIS 7.0
1. เปิด IIS manager
2. ใน Sites node ให้คลิกขวาที่ web site หรือ folder ที่มีไฟล์ที่ต้องการจะ protect
3. ใน Features View ให้ทำการ group by “Area” ใน Section “IIS”
จากนั้นให้คลิก “Handler Mappings”4. ใน frame “Actions” ที่ด้านขวา ให้คลิก “Add Managed Handler…”
5.ใน prompted Dialog ให้ใส่ค่าใน textbox
และ Request Path: *; Type: System.Web.DefaultHttpHandler; Name: AuthFile6. คลิก ok และ restart IIS 7.0
IIS7 ยังมี Url authorization module ที่ทำงานทั้ง ISAPI และ integrated mode
และ protect ทุกๆ content requesthttp://learn.iis.net/page.aspx/142/understanding-iis-7-url-authorization/
Supa Sethasiripong [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- ทำเครื่องหมายเป็นคำตอบโดย supa_sModerator 15 พฤษภาคม 2555 2:02