Secure Store Service isn't available in SharePoint Foundation 2013
After a lot of searching, I figure out its root clause.
Tags
จาก Code Snippet: Get User Credentials Using the Default Secure Store Provider.aspx)
ได้ลองเอา code จากลิงค์ด้านบนไปใช้เพื่ออ่านค่า username, password จาก Secure Store Service แต่พบว่า Code ตัวอย่างนั้นไม่สมบูรณ์ เพราะขาดข้อมูลบางอย่างไป นี่คือสิ่งที่เขาทำตกหล่นไป
Microsoft.Office.SecureStoreService
(อยู่ใน GAC แต่ต้องไปคุ้ยหาเอาจากใน Windows\Assembly
)using Microsoft.Office.SecureStoreService;
ด้วยอีกอันหลังจากนั้นบรรทัด
ISecureStoreProvider provider = SecureStoreProviderFactory.Create();
จะใช้ได้เป็นปรกติ