Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 26th, 2006, 7:30 AM   #1
Ghost
Man Bear Pig Hunter
 
Ghost's Avatar
 
Join Date: Jul 2005
Location: NorCal, USA
Posts: 295
Rep Power: 4 Ghost is on a distinguished road
Validation of viewstate MAC failed, Error

Well I got this fun error on a web site for a client after I left a page with a viewstate open for a day or two before taking action.

Validation of viewstate MAC failed.

Anyone ever seen that before?
__________________
People who click "images" that end with .exe shouldn't have computers.

Last edited by big_k105; Sep 26th, 2006 at 10:49 AM. Reason: Changed title from "M$ Haters Enjoy =P"
Ghost is offline   Reply With Quote
Old Sep 26th, 2006, 8:27 AM   #2
Narue
Professional Programmer
 
Narue's Avatar
 
Join Date: Sep 2005
Posts: 419
Rep Power: 4 Narue is on a distinguished road
>M$ Haters Enjoy =P
What does that have to do with Microsoft? The cause of that exception is nothing more than sloppy programming.
__________________
Even if the voices aren't real, they have some pretty good ideas.
Narue is offline   Reply With Quote
Old Sep 26th, 2006, 9:19 AM   #3
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
To me that error looks like your server ether isn't configured properly, or your code has a bug in it. I suggest turning on debugging, like it suggests in your error message:

Quote:
Originally Posted by Error
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
It would probably give you a good idea where to start looking. Oh, and next time, please use a thread title that is a little more descriptive of your problem.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Sep 27th, 2006, 3:17 AM   #4
Ghost
Man Bear Pig Hunter
 
Ghost's Avatar
 
Join Date: Jul 2005
Location: NorCal, USA
Posts: 295
Rep Power: 4 Ghost is on a distinguished road
Well if you guys do any research on the issue, it is a bug in the .net 2.0 framework.... So Narue, there is your answer. It is a glitch in the view state encryption because it is lost when the session expires and tries to resume.
__________________
People who click "images" that end with .exe shouldn't have computers.
Ghost is offline   Reply With Quote
Old Sep 27th, 2006, 8:02 AM   #5
peace_of_mind
Professional Programmer
 
peace_of_mind's Avatar
 
Join Date: Sep 2004
Location: Hell if I know most of the time
Posts: 439
Rep Power: 5 peace_of_mind is on a distinguished road
Send a message via MSN to peace_of_mind Send a message via Yahoo to peace_of_mind
The title Big_K changed to is still much more appropriate and descriptive than "M$ Haters Enjoy =P".
Quote:
Originally Posted by nnxion in http://www.programmingforums.org/forum/showthread.php?t=4268
Don't use stupid topic names

Post a descriptive topic name! Give a short summary of your problem IN THE SUBJECT. Don't use attention getting subjects. They don't get attention. They repel attention and annoy people.

Here's a great list of topic subjects YOU SHOULD NOT POST:

1) Help me
2) Hello
3) You must know the answer
4) Please help this newbie
5) Something wrong
6) Come on gurus
7) This one for you
8) Just wondering
9) This is too complicated for me
10) Possible?
11) Very urgent
12) I have a question
13) Stupid question
14) Newbie needs help
15) Pulling my hair out
16) This is driving me nuts

Generally ANYTHING similar to those is unacceptable. Just post your problem.

Here is a good example of a way to post a question about an input file function named get():

"File input error w/ get()"

These are bad examples:

"I can't figure this out!"
"Stupid question..."
"Newbie needs regex help"
"Help me! Urgent!"
__________________
Amateurs built the ark
Professionals built the Titanic

peace_of_mind is offline   Reply With Quote
Old Sep 27th, 2006, 8:16 AM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I always liked, "Li'l ol' blonde, nubile, oversexed, raving beauty needs help!"
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Sep 27th, 2006, 11:31 PM   #7
Ghost
Man Bear Pig Hunter
 
Ghost's Avatar
 
Join Date: Jul 2005
Location: NorCal, USA
Posts: 295
Rep Power: 4 Ghost is on a distinguished road
DaWei, can I use that one later?
__________________
People who click "images" that end with .exe shouldn't have computers.
Ghost is offline   Reply With Quote
Old Sep 28th, 2006, 3:01 AM   #8
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Ghost, edit your web.config file, and insert the following lines:
<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Then run you web application again, and do whatever you did to get the error, but this time the page will show you those naughty lines of code. And you'll be able to correct them further.

Also check if this error occurs locally, if the same error occurs, try debugging using Microsofts VWD debugging tools. Its pretty helpful. Mainly because during runtime you can put your mouse over a variable and see its value. :-)
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Sep 28th, 2006, 7:05 AM   #9
Ghost
Man Bear Pig Hunter
 
Ghost's Avatar
 
Join Date: Jul 2005
Location: NorCal, USA
Posts: 295
Rep Power: 4 Ghost is on a distinguished road
This is currently what I have, and what I had at the time. Anything seem wrong? I dont understand why is added the assembly stuff there, but maybe you can tell me. The soluation has other projects that compile as DLLs, such as the business layer and data access layer, are those them?

    <compilation debug="true" strict="false" explicit="true">
      <assemblies>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>
__________________
People who click "images" that end with .exe shouldn't have computers.
Ghost is offline   Reply With Quote
Old Sep 29th, 2006, 3:11 AM   #10
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Well that error page explains a lot

Can you just tell me which controls are on the page?

1. One fix you may be able to try is, click on a control and push F4 to show the properties, then look for one called "Viewstate". If it is set to false on any of your controls, try switching it to true.


2. This may also help: Clicky!


3. If none of these are helping, try adding the following line to your Web.config file:
<pages enableEventValidation="false" viewStateEncryptionMode ="Never" />

Have fun
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C# corruption!!! Kilo C++ 32 May 21st, 2006 8:44 PM
Masm rsnd Assembly 4 May 20th, 2006 9:05 PM
C++ OWL What am I doing wrong Vagabond C++ 7 Mar 24th, 2006 5:31 PM
libraries matko C 1 Jan 22nd, 2006 2:12 PM
HELP please!!! hamacacolgante C 7 Nov 21st, 2005 5:36 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:32 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC