1. 下載 源碼下載
2. build solution,創建虛擬目錄:
右健MyContatacts/MyPromo項目,選擇Properties,點擊左邊的Web,點擊 Create Virtual Directory 按鈕:
建完之后,你的iis里應該有二個site: Contacts 和 Promo
3. 加入下面二行到你的host文件,這里沒有用port,而是用域名:
127.0.0.1 www.my-contacts123.com
127.0.0.1 www.my-promo123.com
4. 打開Visual Studio 2012里Developer command prompt,分別運行下面二行生成證書:
makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=AuthSrv -sky exchange -pe
makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=ResSrv -sky exchange –pe
5.給iisuser訪問權限:
run –> mmc
選擇File ➤ Add/Remove snap-in
選擇Certificates,點擊Add
選擇Computer account, local computer
找到 Personal ➤ Certificates. 右擊certificate ,選擇Manage Private Keys
6. 打開瀏覽器:
輸入http://www.my-promo123.com/promo, 點 Get Contacts 按鈕:
輸入用戶名密碼: awen / awen , 點 Sign In:
點Yes :