application-state

Accessing HttpApplicationState during Session_End

In my ASP.NET application using InProc sessions, Session_End calls a static method in another object to do session-specific clean up. This clean up uses a shared database connection that I am storing in application state. The problem is that I cannot see how to access the application state without passing it (or rather the database con...

ASP.NET Application state vs a Static object

Hi folks, if i have a standard ASP.NET application, is there any difference between making an object static as opposed to putting the object instance in the Application state? from my understanding, both objects exist ONCE for the app domain. Secondly, what happens if you have a static object in a referenced dll, for an ASP.NET site. ...

in IIS, what's the difference between "application" and "session" ?

A Session is per browser (determined via cookies), but when does an "Application" start, and end, and how does IIS know know when a request is a part of the same same "Application" instance (if not done via cookies the same way that sessions are)? ...

How best to generate a random salt for a Web Site?

Hi folks, i'm wanting to generate a random salt value and put it into the Application state. Now, i'm using a web farm, so the Application state will be different per machine. I don't want to purchase distributed state farm apps, either. So .. what are some solutions for this? I thought i could hard-code it in the code OR the web.conf...

Recycling Options for ASP.Net Application State Object

What are the options for recycling the ASP.Net application state object? I'm using that object to store queues of database connections for a web serviced based data access layer. I'm concerned that over days/weeks/months I'll end up allocating growing sums of memory on connections to db's that are no longer in use. The connections are...

Preserving ASP.NET Application State Across Restarts

Any good way to preserve ASP.NET Application state across restarts? I want to be able to set some values restart the app and have them still be there. I want to primarily do this for small "throw-away" test web apps that don't even need a database. Is there some way to do it with static members and serialization? web cache? UPDATE: Ap...

Should I store localization content in the application state

Hi, I am developing my first multilingual C# site and everything is going ok except for one crucial aspect. I'm not 100% sure what the best option is for storing strings (typically single words) that will be translated by code from my code behind pages. On the front end of the site I am going to use asp.net resource files for the wordi...

HttpApplicationState - Why does Race condition exist if it is thread safe ?

I just read an article that describes how HttpApplicationState has AcquireRead() / AcquireWrite() functions to manage concurrent access. It continues to explain, that in some conditions however we need to use an explict Lock() and Unlock() on the Application object to avoid a Race condition. I am unable to understand why a race conditi...

A question regarding application state...

I have a question regarding the application state in asp.net. As i know, data stored in application state is not permanent, data lost when the application is restarted/stopped. So, what does the 'application is restarted/stopped' mean? 2nd Question: If there are few data store in the application state, let's say 3-4 data, will it affect...

is it possible to get back to my application after clicking google maps?

the title says it all. We have made an application for a city in the netherlands that wants tourists to visit their lovely museums. when they reach the page fo a museum we have a little icon that they press and they get transported to google maps which shows them where they are and how to get to the museum. What we would need is a bac...

How to add a System.Xml.XmlDocument type to applications state

I am using Asp.net 3.5 and C# I have to add an XmlDocument to my application state so that everytime my application doesnt access the XML file on my filesystem, I will add this at the Application_Start() function in Global.asax.cs I am adding this to system state as : protected void Application_Start(Object sender, EventArgs e) { ...

Does asp.net MVC have Application variables?

I am busy converting a web application to MVC and have some information saved to Application variables used across multiple tenants/accounts to make things a bit more efficient. I realise the point of MVC is to keep things as stateless as possible, Sesion State obviously makes sense to have and exists in MVC but we dont want to just con...