asp.net web api - How to access HttpContext.Current.Application on OWIN Startup -


i need fill httpcontext.current.application["translations"] on owin startup, httpcontext.current null there.

should use application_start() in global.asax.cs or bad idea?

what alternatives have?

httpcontext not available @ start cannot exist without request. startup class runs once application, not each request.

try accessing in beginrequest handler in global.asax.cs.

protected void application_beginrequest(object sender, eventargs e) {      base.application["translations"] = "my value here";  } 

Comments

Popular posts from this blog

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -