Geeks Talk

Prepare for your Next Interview




What is the use of Viewstatemac?

This is a discussion on What is the use of Viewstatemac? within the ASP.NET forums, part of the Web Development category; What is the use of Viewstatemac.. What will happen if I set the value to True...


Go Back   Geeks Talk > Web Development > ASP.NET

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-16-2008
Junior Member
 
Join Date: Jun 2008
Location: India
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
subbu_msis is on a distinguished road
What is the use of Viewstatemac?

What is the use of Viewstatemac.. What will happen if I set the value to True
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-17-2008
Contributing Member
 
Join Date: Jun 2007
Location: Delhi, India
Posts: 46
Thanks: 0
Thanked 18 Times in 15 Posts
vikasvaidya is on a distinguished road
Re: What is the use of Viewstatemac?

Quote:
Originally Posted by subbu_msis View Post
What is the use of Viewstatemac.. What will happen if I set the value to True
ViewStateMAC property is used for security purpose. It is used to maintain data integrity of viewstate across postbacks.

Basically it is used to check if user has changed (tempered) the viewState and making request.

If we will set EnableViewStateMac to True then, the encoded and encrypted view state is checked to verify that it has not been tampered with on the client.

You can find more information at MSDN
ViewStateMac Property


---V V---
Vikas Vaidya

Please mark this post with Thanks if u found the answer useful
Reply With Quote
  #3 (permalink)  
Old 06-18-2008
Junior Member
 
Join Date: Feb 2008
Location: Hyderabad
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
mnaren is on a distinguished road
Re: What is the use of Viewstatemac?

Hello,
A view state MAC is an encoded version of the hidden variable that a page's view state is persisted to when sent to the browser.
When you set the EnableViewStateMac attribute to true, the encoded and encrypted view state is checked to verify that it has not been tampered with on the client.
It is recommended to set the EnableViewStateMac attribute to true using the @ Page directive in the .aspx file.
I hope this information is enough for you.
Reply With Quote
Reply

  Geeks Talk > Web Development > ASP.NET


Thread Tools
Display Modes



All times are GMT -4. The time now is 02:51 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved