Reviewing State Management in ASP.NET
I plan to take a look at the security enhencements of the state management in ASP.NET 2.0. Let me first review the state management in ASP.NET 1.x.
ASP.NET supports the following techniques for storing state info at the client side:
- Query strings
- Cookies
- Hidden fields
- View state
Query strings:
- Require no postback operation
- Most browsers limit the length of data that can be included in a query string
- No security
- No option for persistence
- No support for storing structured values
- Access query strings using HttpRequest.QueryString[''KeyName"]
Cookies:
- State can be persisted on user's machine
- Require no postback
- Some users disable cookies in their browsers
- Size restriction by browser (approx. 4 KB - 8 KB)
- No support for storing structured values
- No security
- HttpRequest.Cookies and HttpResponse.Cookies
Hidden fields:
- Can be used for pages that post to themself or to other pages
- Increases HTML size
- No support for storing structured values
- No option for persistence
- No security
View state:
- Support for structure values
- Easy configuration options for security
- Increases HTML size
- Works only when a page posts back to itself
- No option for persistence
- ASP.NET retrieves values for postback controls from the HTTP request while values for nonpostback controls from the hidden field _VIEWSTATE
- Page.ViewState
- You can disable the view state using the EnableViewState property at the level of a control, a page, an app, and the machine
- EnableViewStateMac is enable by default
ASP.NET supports server-side state management at two levels:
- Session state
- Application state
Session state:
- Page.Session
- Passing SessionID is with nonpersistent cookies by default
Application state:
- The application state is stored in memory
- Page.Application
- Modify the contents of the application state using a pair of Applicatin.Lock() and Application.Unlock()
Notes were taken from the book MCAD Developing and Implementing Web Applications with Microsoft Visual C# .NET and Microsoft Visual Studio .NET Exam Cram 2 (Exam Cram 70-315)by Amit Kalani and Priti Kalani.
3 Comments:
louis vuitton outlet, ugg boots, ray ban sunglasses, oakley sunglasses, louis vuitton outlet, longchamp pas cher, prada outlet, polo ralph lauren outlet, nike outlet, chanel handbags, louboutin outlet, longchamp outlet, louis vuitton, nike air max, cheap oakley sunglasses, longchamp outlet, jordan shoes, louis vuitton, nike free, tiffany and co, tory burch outlet, prada handbags, replica watches, nike roshe run, longchamp, louboutin, air max, ralph lauren pas cher, christian louboutin outlet, replica watches, louis vuitton, nike air max, kate spade outlet, louboutin pas cher, nike free, oakley sunglasses, sac longchamp, oakley sunglasses, polo ralph lauren outlet, louboutin shoes, uggs on sale, ray ban sunglasses, ray ban sunglasses, burberry, gucci outlet, oakley sunglasses, tiffany jewelry, ugg boots, air jordan pas cher, michael kors
coach outlet, ugg boots, vans pas cher, michael kors, hollister, coach purses, nike air max, ray ban uk, sac guess, ray ban pas cher, mulberry, true religion outlet, hermes, michael kors outlet, oakley pas cher, true religion jeans, lacoste pas cher, ugg boots, michael kors outlet, michael kors outlet, true religion jeans, nike free run uk, tn pas cher, michael kors, nike air max, burberry, vanessa bruno, lululemon, nike roshe, nike air max, ralph lauren uk, coach outlet, north face, replica handbags, nike blazer, converse pas cher, michael kors outlet, timberland, michael kors, abercrombie and fitch, hollister pas cher, true religion jeans, air force, burberry outlet online, michael kors, michael kors outlet, new balance pas cher, north face, kate spade handbags, hogan
mont blanc, nike air max, babyliss, mcm handbags, louboutin, herve leger, ghd, hollister, celine handbags, lancel, new balance, nike trainers, valentino shoes, nfl jerseys, reebok shoes, soccer shoes, oakley, vans shoes, p90x workout, soccer jerseys, nike huarache, converse outlet, nike roshe, abercrombie and fitch, bottega veneta, north face outlet, beats by dre, birkin bag, instyler, gucci, mac cosmetics, chi flat iron, ferragamo shoes, insanity workout, ralph lauren, nike air max, jimmy choo shoes, longchamp, wedding dresses, asics running shoes, vans, hollister, timberland boots, iphone cases, baseball bats, hollister, giuseppe zanotti, north face outlet, ray ban, lululemon
Post a Comment
<< Home