12 2013 档案

摘要:在项目中使用Npoco时发现where in查询总是不能起作用。寻觅了许久终于找到解决方案,特此记录下:Declare @p Varchar(500)Set @p='CoreRole,CorePassword,CoreOnlineUser'SELECT * FROM [Menus] where charindex(','+ModuleName+',',','+@p+',')>0 阅读全文
posted @ 2013-12-25 13:45 kelite 阅读(686) 评论(0) 推荐(0)
摘要:Refresh tokens can potentially improve the situation but also increase complexity. A refresh token is a long lived token that allows requesting new access tokens without having to present the user cre... 阅读全文
posted @ 2013-12-24 18:59 kelite 阅读(577) 评论(0) 推荐(0)
摘要:一般的社交提供商不提供一个Web Service进行身份验证(有很好的理由),而提供一个身份验证的界面,其中包含了某种协议如OpenID(连接)或使用OAuth2认证。这意味着客户端应用必须使用一个浏览器来展现这些UI部件---典型的登录页面和一些类型的许可界面。 这通常通过导航到一个众所周知的URL (网页API的模板使用OAuth2隐流程方法),并等待,直到在其他一些知名的URL会发生回调。在... 阅读全文
posted @ 2013-12-24 17:32 kelite 阅读(871) 评论(0) 推荐(0)
摘要:本文我们将把关注Visual Studio用户认证模板中的 本地用户名/密码帐号特性。他们将其分为了两部分:帐户控制器具备如创建帐号和修改密码等功能;另一部分是在OAuth2认证服务器中进行的认证。我们从创建一个账户开始: 为了创建一个账户,我们需要Post到/api/account/register 节点,对应到帐号控制器的Register方法,这个方法允许匿名访问。 客户端可以这样做: ... 阅读全文
posted @ 2013-12-24 17:24 kelite 阅读(841) 评论(0) 推荐(0)
摘要:The Web API v2用户认证模板提供了流行的应用用户认证场景,如.使用本地帐号的用户名密码认账 (包括创建用户、设置和修改密码)以及使用第三方的认证方式,如facebook,google等等– 在本地中包含了外部帐号的连接 所有的这些均通过使用一个OAuth2认证服务进行. To make all that happen the template combines quite... 阅读全文
posted @ 2013-12-24 16:26 kelite 阅读(4245) 评论(0) 推荐(0)
摘要:http://www.uml.org.cn/net/200512283.htmhttp://www.cnblogs.com/twodays/archive/2004/07/19/25562.aspx--对Guid应用非聚簇索引http://www.codinghorror.com/blog/2007/03/primary-keys-ids-versus-guids.htmlhttp://www.cnblogs.com/zhenyulu/archive/2004/07/20/25816.htmlhttp://blog.miniasp.com/post/2008/01/08/The-Gospel- 阅读全文
posted @ 2013-12-12 09:28 kelite 阅读(221) 评论(0) 推荐(0)
摘要:Fixing ASP.NET MVC 4 Web API 404Posted onNovember 5, 2012For a Web Service providing some REST-style URIs to access the data, I decided to use theASP.NET MVC 4 Web API. Once developed, tested and deployed I experienced a mysterious 404 on my production server.The Web API started originally asWCF Web 阅读全文
posted @ 2013-12-07 02:13 kelite 阅读(13294) 评论(3) 推荐(2)