I just had an inquiry regarding the use of Session variables versus using Application. In other words, an application I've taken over was written so that several domains point to the same application. Depending on the specific domain name, user controls were created to show different graphics.
In the global.asax file, there is a function which gets the Url and assigns it as in the snippet below. My question was, would using Session as opposed to Application be better/worse? What are the differences between the two, because I've tried it both ways and they both work for all intents and purposes.
void Application_BeginRequest(object sender, EventArgs e)
Application["URL"] = Request.Url.ToString(); // some-domain.com or some-domain2.com
//Session["URL"] = Request.Url.ToString(); // Or use this?