Whenver a URL request is made, Web server creates instance of requested
web form, generates HTML and posts it to browser for rendering. It then
destroys instance of web form on the server. When user submits data back to
the web server, a new instance of web form is created which has no
knowledge of earlier webform. Hence conventional web page is stateless. In
ASP.NET before web form get destroyed the state of the webform is stored in
Viewstate(hidden control) on the page and when the page is posted back, the
state of the webform is restored from view state.
A web-farm is group of webservers hosting a single web application.
Sice the web application is shared across multiple servers, session info can
not be stored in process memory of any of servers. It should be stored in a
centralizes database or state machine.
In cookieless session session id gets embedded in URL automatically. So when url request is made, session id is stripped from URL by ASP.NET And is used to identify session information belonging to user.
Yes. Simply include an@ Page directive with an
EnableViewStateMac="true" attribute in each ASPX file you wish to
protect, or include the following statement in Web.config: his
configuration directive appends a hash (officially called the message
authentication code, or MAC) to view state values round-tripped to
the client and enables ASP.NET to detect altered view state. If
ASP.NET determines that view state has been altered when a page
posts back to the server, it throws an exception.
Machine.config) to the view state and hashing the result. An attacker can't modify view state and fix up the hash without knowing the secret key, too.
What is difference between following statements
1 - <%@ outputcache duration=\u201d60\u201d varybyparam=\u201dnone\u201d>
2 - <%@ outputcache duration=\u201d60\u201d varybyparam=\u201d*\u201d>
3 - <%@ outputcache duration=\u201d60\u201d varybyparam=\u201dname\u201d>
Statement 1 caches only one version of the page irrespective of querystring
parameters. Statement 2 caches multiple versions of same page I any of
quewrystring parameter varies. Statement 3 caches multiple versions of the
page for different values of parameter xyz.
TheAdd andInsert methods have the same signature, but there are subtle differences between them. First, calling theAdd method returns an object that represents the cached item, while callingInsert does not. Second, their behavior is different if you call these methods and add an item to the cache
This action might not be possible to undo. Are you sure you want to continue?