03 2011 档案
摘要:五、SessionStateAttribute构造SessionStateAttribute对象时必须传入一个SessionStateBehavior枚举值,通过Attribute的Behavior属性可以获取该值。该Attribute只能用于引用类型(AttributeTargets.Class),不允许重复使用(AllowMultiple=false),允许继承(Inherited=true)。六、MvcRouteHandlerMvcRouteHandler类增加了一个接受IControllerFactory接口实现类的对象作为参数传的构造方法,构造对象允许传入null值。而构造方法内部只
阅读全文
摘要:三、IResolver<TService>和SingleServiceResolver<TService>:IResolver<TService>、MultiServiceResolver<TService>:IResolver<IEnumerable<TService>>IResolver<TService>接口只有一个TService型的Current只读属性,返回相应类型的一个对象。这是一个有Lazy意味的轻量接口。一个简单的IResolver<TService>接口的实现类中,Current
阅读全文
摘要:一、路由(Routing)路由功能最初整合在ASP.NET MVC(以下简称MVC)中,后来被独立出来形成了System.Web.Routing 3.5程序集。ASP.NET 4已经把Routing功能已经转移到了System.Web 4 程序集下作为基础服务的一部分。在使用Routing功能时,您已不再需要在web.config中注册Module,因为UrlRoutingModule已经集成进ASP.NET 4中了,就像FormsAuthenticationModule等Module一样(C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
阅读全文
摘要:1、客户端握手请求(注意:键值之间有一个空格,行间有换行符号0x13x10或者说\r\n)GET /WebSocket/LiveVideo HTTP/1.1Upgrade: WebSocketConnection: UpgradeHost: localhost:8080 (客户端请求主机)Origin: http://127.0.0.1 (来源网页地址)Sec-WebSocket-Key1: 23 asdfJKj,asdjkSec_WebSocket-Key2: wewerw234 jij9980x13x10 + 8个字节Sec_WebSocket-Key3值,没有键名(注意,这里的0x13x
阅读全文