zoukankan      html  css  js  c++  java
  • 用DotNetOpenAuth实现基于OAuth 2.0的web api授权 (一)Getting Start

    1. 下载 源码下载

    2. build solution,创建虚拟目录:

    右健MyContatacts/MyPromo项目,选择Properties,点击左边的Web,点击 Create Virtual Directory 按钮:

    image

    建完之后,你的iis里应该有二个site: Contacts 和 Promo

    image

    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

    image

    6. 打开浏览器:

    输入http://www.my-promo123.com/promo, 点 Get Contacts 按钮:

    image

    输入用户名密码: awen / awen , 点 Sign In:

    image

    点Yes :

    image

    image

  • 相关阅读:
    pip安装
    nfs
    源码方式安装软件
    自启动
    multipath
    linux永久添加和删除路由
    iscsi
    linux识别workstation磁盘的uuid
    centos镜像各种cd,dvd版本区别
    转:C# 中 MSCHART 饼状图显示百分比
  • 原文地址:https://www.cnblogs.com/fengwenit/p/3542566.html
Copyright © 2011-2022 走看看