Example #1
0
        protected virtual void RedirectTo(string newAddress)
        {
            Guard.ArgumentNotNullOrEmptyString(newAddress, "newAddress");
            IHttpContext context = new Microsoft.Practices.CompositeWeb.Web.HttpContext(HttpContext.Current);

            context.Server.Transfer(newAddress);
        }
Example #2
0
        public void Init(HttpApplication context)
        {
            Guard.ArgumentNotNull(context, "httpApplication");
            CompositionContainer rootContainer = ((WebClientApplication)context).RootContainer;

            if (rootContainer != null)
            {
                context.AuthorizeRequest += delegate
                {
                    IHttpContext httpContext = new HttpContext(context.Context);
                    HandleAuthorization(rootContainer, httpContext);
                };
            }
        }
 protected virtual void RedirectTo(string address)
 {
     Guard.ArgumentNotNullOrEmptyString(address, "address");
     IHttpContext context = new Microsoft.Practices.CompositeWeb.Web.HttpContext(HttpContext.Current);
     context.Server.Transfer(address);
 }
 public void Init(HttpApplication context)
 {
     Guard.ArgumentNotNull(context, "httpApplication");
     CompositionContainer rootContainer = ((WebClientApplication) context).RootContainer;
     if (rootContainer != null)
     {
         context.AuthorizeRequest += delegate
                                         {
                                             IHttpContext httpContext = new HttpContext(context.Context);
                                             HandleAuthorization(rootContainer, httpContext);
                                         };
     }
 }