Can't use "defaultbutton" in <form></form> tag in login control page.

I have a login control and I tried to set the default button as the submit button within my form tag in the login page.

But, I am getting the following error.

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.

 

I already generated the machine key.

Any clue!

-1
robinspaul
1/27/2009 11:00:32 PM
asp.net.security 27051 articles. 1 followers. Follow

2 Replies
1636 Views

Similar Articles

[PageSpeed] 0
Get it on Google Play
Get it on Apple App Store

hi robin,

Please try this fix if.. add the below given code into your web.config or
the file that you are executing and see if your issue gets fixed. and let me
know if this was helpfull.

"
<system.web> 
<pages enableViewStateMac="false" /> 
</system.web>
"

Or

edit the page that is getting loaded

<%@ xyz....xyz...** Inherits="MyAssembly.MyPage" enableViewStateMac="False" %>

" enableViewStateMac="False" "


Joydeep Sen
Dotnet Developer

Dont forget to click “Mark as Answer” on the post that helped you.
This credits that member, earns you a point and mark your thread as Resolved for the sake of Future Readers


0
joydeepsen
1/28/2009 6:54:38 AM

Hi,robinspaul

robinspaul:

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.

The Same Thing Is Discussed At

http://forums.asp.net/p/955145/2453001.aspx#2453001
http://forums.asp.net/p/955145/1865368.aspx#1865368
http://forums.asp.net/p/955145/2371829.aspx#2371829
http://forums.asp.net/p/955145/2056712.aspx#2056712
http://forums.asp.net/p/1292920/2502463.aspx#2502463
http://forums.asp.net/p/955145/2478836.aspx#2478836
http://forums.asp.net/p/955145/2453940.aspx#2453940
http://forums.asp.net/p/1156804/1901521.aspx#1901521
http://blogs.msdn.com/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx

 

 


RAGHAV

MVP ASP/ASP.Net Read My Blog


MARK THE POST AS ANSWER IF IT HELPS U.


"Success doesn't come to you…you go to it."--Marva Collins




"Success does not come to those who wait . . . and it does not wait for anyone to come to it." Anonymous


0
raghav_khunger
1/28/2009 9:39:43 AM
Reply:

Similar Artilces:

can I delete <form id="form1" runat="server"> and </form>
Hi: Our website is written by using simple html code, one of the page has some virtual shopping cart code with <form> ....</form>, (for example here: http://www.centercoin.com/coin_supplies/coin_collecting_starter_set.htm ), if I have 10 products, I will have 10 of <from> ...</form> in this page, that is ok. Now, I am trying to redesign the website using asp.net2.0, I notice all the asp page will automatically create a <form id="form1" runat="server"> ...</form>, such as: <html xmlns="http://www.w3.org/19...

question: when i use enableviewstatemac="false" on <page /> , it cause the form can't postback!
i use javascript statement to postback : document.all.form1.submit(); but i found it can't postback.(write "IsPostBack" to the page, it always "false"). thanks!...

what's the different from "<page src="">" and "<page codeBehind="">"
what's the different from "<page src="">" and "<page codeBehind="">" Thank YOU how to make session' life longer? Thank You This very question was asked only 5 days ago. Searching the forums would have yielded the answer you require. However, see this thread. Steven BeyRecursion: see Recursion You can set a new value for the Session Timeout in your web.config file. Or, you can do it in a page through this property: Session.Timeout Note that if you choose the second method, the timeout will only be modified on this page,...

What if I remove <form id="form1" runat="server"></form>
If I am creating an aspx page, which does not need to be a form, i.e. no input is taken from the user, do I need to encapsulate the whole page with in  <form1 runat="server">   What are the implications of removing the form? I realize there will be no viewstate, and again, I won't be able to accept user input, but will everything else work as expected? It seems to be so far, I've just not seen ANY examples where the form tag has been removed. Thanks, Darragh You need the server-side form tag if you are going to have server-side controls on the form.RyanRyan Olshan...

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security pu #3
Hi all, I have two forms in a page . one is  runat="server" and other is for html submit button. while i post the html submit button. the above error is thrown. What will be the reason? Thanks. Bibek This blog would help you.http://blogs.msdn.com/amitsh/archive/2007/07/31/why-i-get-invalid-postback-or-callback-argument-errors.aspx  Hi bibekdahal,to resolve this error u can set the EnableEventValidation = "false" in the page directive. However,  i will recommend u to use ClientScript.RegisterForEventValidation method to register the control which cau...

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security pu #2
hi....  Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. plz reply as possible as with example thx, Tushar...

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security pu #4
when i click on any link during page loading the above error i get my code is in c#.net. can any one help me......  Read here http://msdn.microsoft.com/en-us/library/system.web.ui.page.enableeventvalidation.aspxBind GridView to Dynamically created DataTable | Bind DataTable to DropDownListMy Blog while deploying i m getting following error. plz help me in resolving this error Server Error in '/bestbuy' 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: Could not load file or assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.Source Error: Line 39: <add assembly="Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> Line 40: Line 41: <add assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> Line 42: <add assembly="CrystalDecisions.Shared, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/> Line 43: <add assembly="CrystalDecisions.ReportSource, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692FBE...

How to strip a string of <html>, ,</html>, <body>, </body>, <form ... >, </form> tags?
I have stream which is the HTML input of a page. Now I want to use only that part of this page, that is within <form .....> and </form> tags, and excluding these tags.How would I go about stripping <html>, ,</html>, <body>, </body>, <form ... >, </form>, <head> and </head> tags? I have to make sure that <head ...javascript..> and its corresponding </head> tags are not stripped in this process.sun21170    Wait... you said you wanted to strip the head tags, and you're also saying you need to NOT strip the ...

"<table></table>" and "<frameset><frame></frame></frameset>" in perl/tk
Dear my friends... Anybody would be so kind telling me what is similar in perl/tk to arrange the location of a form written in perl/tk? I want a nice look for my perl/tk application. Somewhat like this below: 1. Name : <place to type-in> 2. Address : <place to type-in> 3. Telephone : <place to type-in> I have made the main menu of my application with "Menubutton". And I want if the user click on the menu that what the user see is only the aimed application displayed on the determined area (under the main menu) but the menu has no change in po...

I've placed <forms loginUrl="home.aspx"></forms> in web.config and now all users that log in go to default.aspx
I've placed <forms loginUrl="home.aspx"></forms> in web.config and now all users that log in go to default.aspx.        <authentication mode="Forms">        <forms loginUrl="home.aspx"></forms>      </authentication>What attribute I should add, to make the user stay on the same page. Btw when I remove  <forms loginUrl="home.aspx"></forms>, users stay on the same page after login.Thanks. try one of these.....

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.
I have the following error message come up whenever I click this button in my DataList. <asp:ImageButton ID="BtnDelete" ImageUrl="~/Images/delete.gif" CommandName="Delete" CausesValidation="true" ToolTip="Delete this photo." runat="server" OnClientClick="return confirm('Request that this item be deleted?');" />Basically this is supposed to fire the AlbumList_DeleteCommand in the codefile, but instead, it throws an exception protected void AlbumList_DeleteCommand (Object src, DataListCommandEventArgs e) &n...

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page
Hi ,I am getting the following runtime error in my Asp.net page when i click on a Button in asp.net 2.0 page before the page completely loads.Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the Clie...

Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> Error?
Hi, I  have  the grid,in that edit button is  there .when  i  click  on  the edit  button it will  go  another  page,but  im  getting  this  error. for  delete  also  same  error. Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events or...

<FORM method="post"> to aspx page with <Iframe>
Hi Guys,I'm fighting here with something nasty. On my e-commerce site, I've a GridView that showes: Order number, Address and Tracking number.Being a customer of UPS, I've got this code from them, that ridirect the user in a UPS custom page to view the order shipping status of the InquiryNumber inputted : <FORM method="post" action = "http://wwwapps.ups.com/WebTracking/OnlineTool"><INPUT type="text" size=35 name="InquiryNumber"><INPUT type="hidden" name="TypeOfInquiryNumber" value="T"><...

superreview granted: [Bug 307616] <input type="image"> with missing image gives "ASSERTION: Form control has a frame, but it's not a form frame" : [Attachment 207080] patch
Boris Zbarsky (out of town Dec 12 -- Jan 2) <bzbarsky@mit.edu> has granted Boris Zbarsky (out of town Dec 12 -- Jan 2) <bzbarsky@mit.edu>'s request for superreview: Bug 307616: <input type="image"> with missing image gives "ASSERTION: Form control has a frame, but it's not a form frame" https://bugzilla.mozilla.org/show_bug.cgi?id=307616 Attachment 207080: patch https://bugzilla.mozilla.org/attachment.cgi?id=207080&action=edit ------- Additional Comments from Boris Zbarsky (out of town Dec 12 -- Jan 2) <bzbarsky@mit.edu> Yep...

<sessionState timeout="x"/> vs <forms timeout="y"/>
How to configure web app: x=y x>y x<y ?...

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %>
Hi All, I am getting the above error when click on Ok button on confirm message box in web application.in ASP.net 1.1 This is my requirement. When I click on the Search button on web page it should check the data in db then it should be display Confirm message dialog "Do u want to load the data" if user click yes it should load the data in page and it is working fine in my system (localhost),when I copy the same code in server and I am accessing web page from my machine using IE it giving the above error.Please any one help on this it is urgent thanks in advance... //Button eve...

How to set the page's "keywords" and "description" in the <head></head> ?
I have a table like this : Create Table Article(    ArticleId        int identity(1,1)   Not Null,    Title              varchar(50)         Not Null,    Keywords      varchar(50)         Not Null,    Description    varchar(200)       Not Null,    Content   ...

<div style="..."> works, but <div class="sameStyle"> doesn't?
Got a bit of a bizarre scenario here. When I add the following style to a div: <asp:Content ID="Content2" ContentPlaceHolderID="contents" Runat="Server"> <div style="height: 50px; background: pink url(/img/icons/remove.png) no-repeat bottom right; border: solid 1px red;"> test<br /> <asp:ContentPlaceHolder ID="contents" runat="server"></asp:ContentPlaceHolder> </div> </asp:Content>   The page works great - the div is displaying the ...

superreview granted: [Bug 365381] <method name="foo"><body/></method> doesn 't compile
Boris Zbarsky (probably no internet Dec 20 -- Jan 2) <bzbarsky@mit.edu> has granted Gavin Sharp <gavin.sharp@gmail.com>'s request for superreview: Bug 365381: <method name="foo"><body/></method> doesn't compile https://bugzilla.mozilla.org/show_bug.cgi?id=365381 Attachment 250114: patch https://bugzilla.mozilla.org/attachment.cgi?id=250114&action=edit ------- Additional Comments from Boris Zbarsky (probably no internet Dec 20 -- Jan 2) <bzbarsky@mit.edu> >+ // Get the body >+ nsDependentString body; >+ PRUnicha...

superreview requested: [Bug 365381] <method name="foo"><body/></method> doesn't compile
Gavin Sharp <gavin.sharp@gmail.com> has asked Boris Zbarsky (probably no internet Dec 20 -- Jan 2) <bzbarsky@mit.edu> for superreview: Bug 365381: <method name="foo"><body/></method> doesn't compile https://bugzilla.mozilla.org/show_bug.cgi?id=365381 Attachment 250114: patch https://bugzilla.mozilla.org/attachment.cgi?id=250114&action=edit ------- Additional Comments from Gavin Sharp <gavin.sharp@gmail.com> The reason <body></body> worked for Asaf is because he had whitespace between the two when he tested. "<...

Why is "<MyControl ... />" different to "<MyControl ...> </MyControl>"
Hi I have made a CompositeControl and had it working fine. The sequence of events was: Page -> Page_Load(), MyControl -> CreateChildControls(). This was fine because I had to set a certain property in my control during page load before CreateChildControls was called. Anyway.... suddenly it all stopped working and it turned out that the sequence of events changed to MyControl -> CreateChildControls(), Page -> Page_Load(). This caused it to blow up because the property was not set. After a few hours of pulling my hair out and undoing all the recent changes I had made it turns out...

Template field and href?? <a href='<%# DataBinder.Eval(Container.DataItem,"urunnumarasi",Request.ApplicationPath+"/detayliurun.aspx?urunnumarasi={0}") %>'> ....how can i send categor, category1 with u
hi friends my code is below.. how can i send categor, category1 with urunnumarasi with below code?  catagory and category1 are other coulumname <a href='<%# DataBinder.Eval(Container.DataItem,"urunnumarasi",Request.ApplicationPath+"/detayliurun.aspx?urunnumarasi={0}") %>'> cheersMark as me if my question or my answer can be helpful for you :) Hi oguzkaygun, Try this: <a href='<%# Request.ApplicationPath+"/detayliurun.aspx?" + DataBinder.Eval(Container.DataItem, "category") + "=" + DataBinder.Ev...

<script language="javascript" runat="server"> can't be used?
I place this inside on a content page: <script language="javascript" runat="server"> function ontextchange() { document.getElementById("ctl00_ContentPlaceHolder1_lbl_CatchInfo").innerHTML = "change in text or whatever"; } </script> and get an error saying JavaScript can't be used as another language has been stated by the CodeFile-attribute...? It works if i remove the runat=server tag----What is wrong??? javascript is a client side language. take out the "runat =server" part and see what happens Becaus...

Web resources about - Can't use "defaultbutton" in <form></form> tag in login control page. - asp.net.security

Resources last updated: 2/18/2016 8:07:23 PM