473,383 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Forms Authentication and long ViewState Problem

Hi,

I appear to have a problem where the user is not kicked back to the
forms authentictation url when they post a webform, via a get, that
results in a long url due to viewstate. Instead they get the error at
the end of the post

Web.Config:
<authentication mode="Forms">
<forms path = "/" loginUrl = "View/Login.aspx" timeout="1"
protection="All" name="DiscAccept"/>
</authentication>
<authorization>
<deny users = "?" />
</authorization>

URL:
http://localhost/App/View/Login.aspx...AyOjUwLjAxMjQz
zc7Pj47Oz47Pj47Pj47Pu%2BxizxVhIWgw4i0JUECemLiNzSQ& Button1=Button
Any Ideas?

Thanks
Jerry
The following error occurs:
Server Error in '/App' Application.
--------------------------------------------------------------------------------

Unable to validate data.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unable to validate data.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
System.Web.UI.LosFormatter.Deserialize(String input)

[HttpException (0x80004005): Authentication of viewstate failed. 1)
If this is a cluster, edit <machineKey> configuration so all servers
use the same validationKey and validation algorithm. AutoGenerate
cannot be used in a cluster. 2) Viewstate can only be posted back to
the same page. 3) The viewstate for this page might be corrupted.]
System.Web.UI.LosFormatter.Deserialize(String input)
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()

[HttpException (0x80004005): Invalid_Viewstate
Client IP: 127.0.0.1
Port: 2254
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET
CLR 1.1.4322)
ViewState: dDw3ODI4NDUwNDg7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47Pj tsPHQ8cDxsPFRleHQ7PjtsPDFGYWxzZVRpbWU6IDE1OjUzOjMw LjI4NTMxNTg7Pj47Oz47Pj47Pj47Pp6guX9DgsXhd+9xKrEpLU f9I6e8
Http-Referer: http://localhost/App/View/CWebForm2....Button1=Button
Path: /App/View/Login.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain()


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032
Nov 19 '05 #1
2 2124
Why is your timeout set to only one minute?

"Jerry O" wrote:
Hi,

I appear to have a problem where the user is not kicked back to the
forms authentictation url when they post a webform, via a get, that
results in a long url due to viewstate. Instead they get the error at
the end of the post

Web.Config:
<authentication mode="Forms">
<forms path = "/" loginUrl = "View/Login.aspx" timeout="1"
protection="All" name="DiscAccept"/>
</authentication>
<authorization>
<deny users = "?" />
</authorization>

URL:
http://localhost/App/View/Login.aspx...AyOjUwLjAxMjQz
zc7Pj47Oz47Pj47Pj47Pu%2BxizxVhIWgw4i0JUECemLiNzSQ& Button1=Button
Any Ideas?

Thanks
Jerry
The following error occurs:
Server Error in '/App' Application.
--------------------------------------------------------------------------------

Unable to validate data.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Unable to validate data.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKey.GetDecodedData (Byte[] buf,
Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)
System.Web.UI.LosFormatter.Deserialize(String input)

[HttpException (0x80004005): Authentication of viewstate failed. 1)
If this is a cluster, edit <machineKey> configuration so all servers
use the same validationKey and validation algorithm. AutoGenerate
cannot be used in a cluster. 2) Viewstate can only be posted back to
the same page. 3) The viewstate for this page might be corrupted.]
System.Web.UI.LosFormatter.Deserialize(String input)
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()

[HttpException (0x80004005): Invalid_Viewstate
Client IP: 127.0.0.1
Port: 2254
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET
CLR 1.1.4322)
ViewState: dDw3ODI4NDUwNDg7dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47Pj tsPHQ8cDxsPFRleHQ7PjtsPDFGYWxzZVRpbWU6IDE1OjUzOjMw LjI4NTMxNTg7Pj47Oz47Pj47Pj47Pp6guX9DgsXhd+9xKrEpLU f9I6e8
Http-Referer: http://localhost/App/View/CWebForm2....Button1=Button
Path: /App/View/Login.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium()
System.Web.UI.Page.LoadPageViewState()
System.Web.UI.Page.ProcessRequestMain()


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032

Nov 19 '05 #2
"=?Utf-8?B?VHUtVGhhY2g=?=" <Tu*****@discussions.microsoft.com> wrote in message news:<CD**********************************@microso ft.com>...
Why is your timeout set to only one minute?


For testing purposes
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
1
by: Srinivasa Raghavan | last post by:
Hi All, I have some doubts on the Treeview control and Form Authentication 1) will Form Authentication work if cookies are disabled. 2) I have problem in the following code (TreeView...
3
by: Martin | last post by:
Dear fellow ASP.NET programmer, I stared using forms authentication and temporarily used a <credentials> tag in web.config. After I got it working I realized this wasn't really practical. I...
5
by: Kenneth Keeley | last post by:
Hi, I have a web app that has forms authentication and I can login to the page the first time I go there but it never times me out if I come back in 24 hours a hit the refresh key the page loads...
2
by: Iggy Evans | last post by:
Hi My app is trying to login to an ASP.NET site that uses Forms authentication. I am trying to do in my app (what was previously posted in a newsgroup) the same that a browser does 3) The browser...
7
by: - Steve - | last post by:
I have forms based authentication working, using my Active Directory for authentication. I have a web page that creates a user in active directory. When I was using IIS authentication it worked...
6
by: Manny Chohan | last post by:
I am using forms authetication in the web config. i can validate a user against a database and click on images which makes hidden panels visible.However when i click on the link inside a panel...
0
by: ketax | last post by:
Hi expert, I am getting this type of error 2 times from one user: Event code: 4009 Event message: Viewstate verification failed. Reason: The viewstate supplied failed integrity check. ...
4
by: bsdanielm | last post by:
Hello folks, Can someone please help me with this??? Students at our university use our C# forms to request books/articles. These seem to have broken suddenly without my involvement (as...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.