protected override void Initialize(System.Web.Routing.RequestContext ctx) { var module = ctx.HttpContext.Request.Url == null ? "CartonManager" : ctx.HttpContext.Request.Url.AbsoluteUri; var clientInfo = string.IsNullOrEmpty(ctx.HttpContext.Request.UserHostName) ? ctx.HttpContext.Request.UserHostAddress : ctx.HttpContext.Request.UserHostName; _repos = new AutoCompleteRepository(ctx.HttpContext.User.Identity.Name, module, clientInfo, ctx.HttpContext.Trace); base.Initialize(ctx); }
protected override void Initialize(System.Web.Routing.RequestContext ctx) { const string MODULE = "Repack"; var clientInfo = string.IsNullOrEmpty(ctx.HttpContext.Request.UserHostName) ? ctx.HttpContext.Request.UserHostAddress : ctx.HttpContext.Request.UserHostName; _repos = new AutoCompleteRepository(ctx.HttpContext.User.Identity.Name, MODULE, clientInfo, ctx.HttpContext.Trace); base.Initialize(ctx); }
protected override void Initialize(System.Web.Routing.RequestContext ctx) { var clientInfo = string.IsNullOrEmpty(ctx.HttpContext.Request.UserHostName) ? ctx.HttpContext.Request.UserHostAddress : ctx.HttpContext.Request.UserHostName; var userName = ctx.HttpContext.SkipAuthorization ? string.Empty : ctx.HttpContext.User.Identity.Name; var connectString = ConfigurationManager.ConnectionStrings["dcms8"].ConnectionString; _repos = new AutoCompleteRepository(ctx.HttpContext.Trace, connectString, userName, clientInfo); base.Initialize(ctx); }