Visual Studio 2012 之快速設定 Windows Azure Active Directory Access Control Service

這篇文章說明 VS 2010 設定 ACS

How to Authenticate Web Users with Windows Azure Active Directory Access Control

https://www.windowsazure.com/en-us/develop/net/how-to-guides/access-control/

 

若是使用 VS 2012 可以簡化整個設定的動作, 就讓我們一起做一次吧.

需先準備

1. Visual Studio 2012

2. Windows Azure Account

3. 啟用 Windows Identity Framework Runtime

4. 安裝 Identity and Access Tool

接下來, 10 個步驟之快快樂樂做設定:

1. 由 Windows Azure Portal 建立一個 Access Control Service

image

2. 由 Windows Azure Portal 建立一個 Web Site

image

3. 使用 Visual Studio 2012 建立一個 ASP.NET Empty Web Application

image

4. 使用 Identity and Access Tool 來設定 Access Control Service (這個 GUI 是有安裝 Identity and Access Tool 才會出現的選項)

image

5. 選擇  Use the Windows Azure Access Control Service

image

6. 輸入 ACS Namespace and Key

image

KEY 是那來的?

image

image

image

image

 

7. 設定 Realm and Return Url

image

8. Publish ASP.NET Web Application 到  Windows Azure Web Site

image

9. 瀏覽 https://ACSWeb.azurewebsites.net , 發現它被導到 ACS

image

10. 使用 Windows Live ID 登入成功後, 即導回 https://ACSWeb.azurewebsites.net

 

筆者的開發環境為: Windows 8 x64 + Visual Studio 2012 + Identity and Access Tool.

Enjoy.