Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
The attached error pops up every once in awhile, and pretty randomly. I just saw it when clicking to the admin from the store. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.File Attachment(s): random-error.htm (10kb) downloaded 5 time(s).You cannot view/download attachments. Try to login or register. |
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Additional info from the event log (edited to remove store domain): * 1/8/2007 4:00:08 PM * Error * Session:337fcd4f-6acd-47bd-9c3e-258824cfd506<br>To:http://mystore.com/BVAdmin/Default.aspx <br>From:http://mystore.com/BVAdmin/Default.aspx<br>User:12.210.66.87(12.210.66.87)<br>Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 * 1/8/2007 4:00:08 PM * System.Web * Unable to validate data.[ at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) ] BTW, I'm seeing a lot of the first error in the event log. |
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
Are you by any chance trying to run this on more than one box at a time with a load balancer? (I suspect not, but I figured it couldn't hurt to ask) Are you getting this on more than one page? This error looks like it is coming from the default.aspx in the admin side. Is this the only page that is throwing the error? Also, on that page in the admin, what content blocks have you added to it? Can you give me a screenshot of the page (removing any customer data of course). |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
I'm looking through the event log and am seeing the above errors on other pages too, such as Catalog/Default.aspx, People/users_edit.aspx, BVModules/CategoryTemplates/Bulk Order List/Category.aspx, People/Default.aspx, Catalog/ProductChoiceEdit.aspx, the home page and others.
Only the default content blocks exist on the admin default page. No orders. |
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
Hmm, you may have a server issue then. Are any other asp.net apps running on this box? |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 5/14/2005(UTC) Posts: 398
|
Cliff, Is there a reason that your app pool might be recycling or are you getting that error after a period of time? If you haven't set your machine key and need to you can use this page to generate one: http://www.betterbuilt.com/machinekey/ |
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
Good call, if you are running under IIS 6.0 and the user that your app domain is authenticated as is not the local system account, network service account, or an administrator account then worker process recycling can cause viewstate MAC errors. Also, if you are running your website in a web garden, (where you are running multiple app pools) you are also going to want to set a machine key as was stated above. |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
There's no reason why it should be recycling that I am aware of; currently in development, only two users hitting it. No web garden, just shared hosting. I added this to the web.config and was going to see if the error ever pops up again: Code:<machineKey validationKey="AutoGenerate,IsolateApps"/> Is that a good idea? |
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
If you're seeing this error you can try disabling view state encryption for the page:
At the top of the page change this <%@ Page Language="VB" MasterPageFile="~/BVModules/Themes/Bvc5/Default.master"
To read like this <%@ Page Language="VB" viewStateEncryptionMode ="Never" MasterPageFile="~/BVModules/Themes/Bvc5/Default.master"
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
As far as I know at this point it is an issue with ASP.NET 2.0 and how it handles the viewstate.
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
IIS 6.0 recycles the worker process on a normal basis. Even when it isn't under heavy load. You should try to define a key for the viewstate encryption or disable it. If you are in shared hosting it is quite possible that your app pool is running under a normal user account which is exactly why you would be seeing this error. AutoGenerate is exactly the issue that is probably causing your problem. I would follow Carl's advice and just setup a static encryption key for your site. |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 10/22/2006(UTC) Posts: 74
|
From my notes, may not be worth a whole lot:
12-25 viewstate problem. nameremoved claims it is only a recent probem. When a browser is closed, then reopened, it doesn't log you out, but shows "sign out()" doesnt' seem to know who you are.??? :resolved by changing cookie names?? don't understand that one
BTW, this was only an issue for the person that assumed the original admin login that was included right after the BVC install. Anyway, you might just try changing the cookie names in the admin console and see if that helps anything.
And do verify that the server is running only a single worker process from the same app pool as BVC.
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
Another thing that can happen is if you have view state encryption turned on (which is by default) these errors can sometime result from posting back a page before it is fully rendered. For some reason asp.net renders the hidden viewstate field at the top of the page and then renders the viewstateencrypted hidden field at the bottom of the page. If you post back before the page is fully rendered then you can cause a postback without this field, which causes the viewstate MAC to fail since it won't be decrypted on the server side.
The only way to fix this is to disable viewstate encryption for the whole site, but there are certain controls (such as gridviews) that require that the viewstate be encrypted and will force it to do so. |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
I added the machine key and was getting this error:
“Server Error in ’/’ Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Machine validation key is invalid. It is ‘130’ chars long. It should be either “AutoGenerate” or between 40 and 128 Hex chars long, and may be followed by ”,IsolateApps”.
Source Error:
Line 37: Line 38: Line 39: Line 40: <!— Line 41: Set compilation debug=”true” to insert debugging
Source File: E:\WEBS\plumeriabay\WWW\web.config Line: 39
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210” ------------------------------ |
|
|
|
|
Rank: Member
Joined: 3/1/2006(UTC) Posts: 1,142
|
I have not used Better Built's key generator, try this one http://www.aspnetresourc...om/tools/keycreator.aspxAlso, on better built's, did you make sure that you pasted the asp.net 2.0 one? This error is because the machine key is invalid. |
Justin Etheredge Senior Software Engineer BVSoftware |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Yes, I used the 2.0 one. I'll try the other in a while and let you know. |
|
|
|
|
Rank: Member
Joined: 5/14/2005(UTC) Posts: 398
|
Sorry cliff, try that again, i typed that up a little too quickly and gave you a key that was 2 characters too long. If you generate a new one and paste it into web config inside the <system.web> tags you should be good to go.
Once the key is in and working, if you still get that error randomly, there may be a communication/server load problem that is preventing the server from receiving the entire viewstate intact and therefore unable to decrypt it. |
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Some further information; it seems that the merchant is seeing this specific error mostly this evening when doing things like re-ordering categories. So it could be a 'clicking-before-fully-loaded' issue, although the viewstate is at the top of the page in this store... |
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Nope, that didn't seem to fix the issue. The merchant is still seeing the error pretty frequently. Noah says that the app pool is running under the "network service" account and there are other app pools using the same account but not the same app pool.
Stumped. |
|
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Thanks, Carl, that works now. I appreciate the info. :) |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.