上一页 1 ··· 97 98 99 100 101 102 103 104 105 ··· 164 下一页
摘要: Implementing Basic Authentication in ASP.NET 2.0ByAdministrator27. 八月 2008 20:35I have many times wanted to implement basic authentication in asp.net applications, but has been unwilling to use the built in basic authentication of IIS, since I think its a bother to use either the Windows machine' 阅读全文
posted @ 2012-12-15 19:20 火腿骑士 阅读(256) 评论(0) 推荐(0)
摘要: var http = require('http');var server = http.createServer(function(req, res) {// console.log(req); // debug dump the request// If they pass in a basic auth credential it'll be in a header called "Authorization" (note NodeJS lowercases the names of headers in its request object) 阅读全文
posted @ 2012-12-15 19:16 火腿骑士 阅读(198) 评论(0) 推荐(0)
摘要: HTTP使用BASIC认证的原理及实现方法上一篇/下一篇2011-10-19 15:56:15 / 个人分类:java查看( 4555 )/评论( 5 )/评分(10/0)一.BASIC认证概述在HTTP协议进行通信的过程中,HTTP协议定义了基本认证过程以允许HTTP服务器对WEB浏览器进行用户身份证的方法,当一个客户端向HTTP服务器进行数据请求时,如果客户端未被认证,则HTTP服务器将通过基本认证过程对客户端的用户名及密码进行验证,以决定用户是否合法。客户端在接收到HTTP服务器的身份认证要求后,会提示用户输入用户名及密码,然后将用户名及密码以BASE64加密,加密后的密文将附加于请求信 阅读全文
posted @ 2012-12-15 19:06 火腿骑士 阅读(291) 评论(0) 推荐(0)
摘要: BasicAuthMessageHandler1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950publicclassBasicAuthMessageHandler:DelegatingHandler{privateconststringBasicAuthResponseHeader="WWW-Authenticate";privateconststringBasicAuthResponseHeaderValue="Basic&quo 阅读全文
posted @ 2012-12-15 17:54 火腿骑士 阅读(537) 评论(0) 推荐(0)
摘要: using System;using System.Net;using System.Security.Cryptography;using System.Security.Cryptography.X509Certificates;using System.Security.Principal;using System.ServiceModel.Channels;using System.Threading;using System.Web.Http;using System.Web.Http.Controllers;using System.Web.Http.Filters;using D 阅读全文
posted @ 2012-12-15 17:50 火腿骑士 阅读(715) 评论(0) 推荐(0)
摘要: http://stackoverflow.com/questions/11135473/how-to-use-an-authorized-username-in-other-controllershttp://stackoverflow.com/questions/12227495/httpactioncontext-request-headers-authorization-is-null//----------------------------------------------------------------------------------Posted on June 10, 阅读全文
posted @ 2012-12-15 17:38 火腿骑士 阅读(696) 评论(0) 推荐(0)
摘要: 使用asp.net mvc3的Filter模拟实现http basic Authentication近段时间,在编写一个淘宝家园的手机客户端,需要一个配套的api提供服务,使用http basic验证来确认用户。在iis7上架了一个api的测试站点,iis默认的http basic 验证需要和windows的用户绑定在一起,无法将用户认证和业务数据中的用户进行对应关联。查询相关资料后,准备使用mvc的filter模拟实现http basic authentication,也方便在实现api时对验证和非验证的调整。1.vs2010中建立asp.net mvc3 web项目2.添加用户验证filt 阅读全文
posted @ 2012-12-15 17:25 火腿骑士 阅读(267) 评论(0) 推荐(0)
摘要: Asp.net MVC中Controller返回值类型在mvc中所有的controller类都必须使用"Controller"后缀来命名并且对Action也有一定的要求:必须是一个public方法必须是实例方法没有标志NonActionAttribute特性的(NoAction)不能被重载必须返回ActionResult类型如:[csharp]view plaincopypublicclassMyController:Controller{//必须返回ActionResult类型publicActionResultHelloWorld(){ViewData["Me 阅读全文
posted @ 2012-12-15 17:11 火腿骑士 阅读(198) 评论(0) 推荐(0)
摘要: http://blogs.msdn.com/b/scottgu/archive/2011/05/23/asp-net-mvc-3-razor-helper.aspxhttp://weblogs.asp.net/scottgu/archive/2011/05/12/asp-net-mvc-3-and-the-helper-syntax-within-razor.aspxhttp://blog.joycode.com/scottgu/archives/2010/12/30/116202.joyASP.NET MVC 3: Razor中的@:和语法By devdivchina | Published 阅读全文
posted @ 2012-12-15 14:27 火腿骑士 阅读(225) 评论(0) 推荐(0)
摘要: ASP.NET MVC 3:缓存功能的设计问题2011年12月19日16:14来源:博客作者:陈希章 编辑:苏巧红评论:0条 【IT168技术】今天这一篇文章我来谈一谈在MVC 3项目中的缓存功能,以及针对缓存的一些设计上的考量,给大家参考参考。 为什么需要讨论缓存?缓存是一个中大型系统所必须考虑的问题。为了避免每次请求都去访问后台的资源(例如数据库),我们一般会考虑将一些更新不是很频繁的,可以重用的数据,通过一定的方式临时地保存起来,后续的请求根据情况可以直接访问这些保存起来的数据。这种机制就是所谓的缓存机制。 根据缓存的位置不同,可以区分为: ①客户端缓存(缓存在用户的客户端,例如... 阅读全文
posted @ 2012-12-15 13:53 火腿骑士 阅读(198) 评论(0) 推荐(0)
上一页 1 ··· 97 98 99 100 101 102 103 104 105 ··· 164 下一页