public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            //TODO: fix this hack
            filterContext.HttpContext.Response.Content = new HttpStringContent(" ");

            if (filterContext.HttpContext.RouteUri == null)
            {
                filterContext.Result = new HttpStatusCodeResult(HttpStatusCode.BadRequest, "Bad Request");
                return;
            }

            if (this.Request.Headers.Contains(new KeyValuePair<string, string>("Upgrade", "Websocket")) &&
                this.Request.Headers.Contains(new KeyValuePair<string, string>("Connection", "Upgrade")))
            {

                string webSocketVersion;
                this.Request.Headers.TryGetValue("Sec-WebSocket-Version", out webSocketVersion);
                if (webSocketVersion != "13")
                {
                    filterContext.Result = new HttpStatusCodeResult(HttpStatusCode.BadRequest, "Invalid Websocket Version");
                    return;
                }

                string webSocketKey;
                if (this.Request.Headers.TryGetValue("Sec-WebSocket-Key", out webSocketKey))
                {

                    filterContext.HttpContext.Response.Headers.Add("Upgrade", "Websocket");
                    filterContext.HttpContext.Response.Headers.Add("Sec-WebSocket-Accept", WebSocketUtils.HashWebSocketKey(webSocketKey));
                    filterContext.HttpContext.Response.Headers.Add("Sec-WebSocket-Location", "ws://localhost:8181/websession");

                    string webSocketOrigin;
                    this.Request.Headers.TryGetValue("Sec-WebSocket-Origin", out webSocketOrigin);
                    if (webSocketOrigin != null)
                        filterContext.HttpContext.Response.Headers.Add("Sec-WebSocket-Origin", webSocketOrigin);

                    filterContext.Result = new HttpStatusCodeResult(HttpStatusCode.SwitchingProtocols, "WebSocket Protocol Handshake");

                    base.OnActionExecuting(filterContext);
                }

            }

        }
 public virtual void OnActionExecuting(ActionExecutingContext filterContext)
 {
    
 }