Is it necessary to lock application state before accessing it ?
Answer / kumar saurabh
Only if you're performing a multistep update and want the update to be treated as an atomic operation. Here's an example:
Application.Lock ();
Application["ItemsSold"] = (int) Application["ItemsSold"] + 1;
Application["ItemsLeft"] = (int) Application["ItemsLeft"] - 1;
Application.UnLock ();
By locking application state before updating it and unlocking it afterwards, you ensure that another request being processed on another thread doesn't read application state at exactly the wrong time and see an inconsistent view of it.
Is This Answer Correct ? | 0 Yes | 0 No |
what is caching,session? when & what is used mostly in which situtations, how they r implemented in real time? tell with example?
Explain weak typing and strong typing.
Can we make activex dll also ti execute in some process as that of client ? How can we do?
What is a web pool?
can we edit records from repeater control
What is the difference between ldap and active directory?
What is csrf attack in asp.net?
Differentiate between client-side and server-side validations in web pages.
what is shared assembly asp net
can we remote debug applications with the remote debugger installed with vs.net 2002, with vs.net 2003?
What is Difference between Callbacks and Postback in ASP.NET?
What are validator? Name the validation controls in asp.net? How do you disable them?