Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ERROR: The state information is invalid for this page and might be corrupted

Reply
Thread Tools

ERROR: The state information is invalid for this page and might be corrupted

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      12-09-2006
I am recieving the following error on the second postback of a page I have
written:


The state information is invalid for this page and might be corrupted

Stack Trace:

[FormatException: Invalid character in a Base-64 string.]
System.Convert.FromBase64String(String s) +0
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +72
System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String
serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter,
String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +140

[ViewStateException: Invalid viewstate.
Client IP: 156.12.154.213
Port: 4212
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
ViewState:
/wEPDwUKMTU5MTA2ODYwOWRkss85+lCwdpXAiRIXg3K0QPiFDCk =,/wEPDwUJNzM0NTM2OTI4ZGR70CFkynUOZFCdEqpCi5JMYQiXmw= =
Referer: http://www.nathansokalski.com/screenscraper.aspx
Path: /screenscraper.aspx]

[HttpException (0x80004005): The state information is invalid for this page
and might be corrupted.]
System.Web.UI.ViewStateException.ThrowError(Except ion inner, String
persistedState, String errorPageMessage, Boolean macValidationError) +116
System.Web.UI.HiddenFieldPageStatePersister.Load() +240
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint) +154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.screenscraper_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
+154
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +64



--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.210

The page is supposed to allow you to enter a URL and then display that page
below the small form that is in my code, which is as follows:


ScreenScraper.aspx:

<%@ Page Language="vb" AutoEventWireup="false"
CodeBehind="ScreenScraper.aspx.vb" Inherits="WebApplication1.ScreenScraper"
EnableViewState="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ScreenScraper</title>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox ID="txtSourcePath" runat="server" Width="800px"/>
<asp:Button ID="btnGetSource" runat="server" Font-Bold="True"
Text="Get Source" Width="85px"/><br/><br/>
<asp:Label ID="lblSource" runat="server"/>
</form>
</body>
</html>


ScreenScraper.aspx.vb:

Partial Public Class ScreenScraper : Inherits System.Web.UI.Page
Protected Sub btnGetSource_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnGetSource.Click
Dim source As New System.Net.WebClient()
Dim utf8 As New System.Text.UTF8Encoding()
lblSource.Text =
utf8.GetString(source.DownloadData(txtSourcePath.T ext))
End Sub
End Class


Most of the web pages I could find about this error said it was related to
ViewState, but my *.aspx file has EnableViewState="false" in the Page
directive. My code works fine with every URL I have tried it with when it is
the first URL I try, but the second one always gives me the error shown
above. I tried everything I could think of, but nothing seemed to help.
Although it may not be sufficient for other applications or pages, for this
page just having a way to make it act as if it being opened for the first
time would make it work (kind of like a reset or restart command?). Thanks.
--
Nathan Sokalski
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.nathansokalski.com/


 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      12-10-2006
Nathan,

have you tried checking for IsPostback in the Page_Load event ?

i.e., let the code run if it's *not* a Postback and if it *is* a Postback, not let it run.

Sub Page_Load

If Not IsPostBack
' your screen scrape code

End If
End Sub



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"Nathan Sokalski" <(E-Mail Removed)> wrote in message
news:O3gCfM%(E-Mail Removed)...
>I am recieving the following error on the second postback of a page I have written:
>
>
> The state information is invalid for this page and might be corrupted
>
> Stack Trace:
>
> [FormatException: Invalid character in a Base-64 string.]
> System.Convert.FromBase64String(String s) +0
> System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +72
> System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String
> serializedState) +4
> System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter, String serializedState) +37
> System.Web.UI.HiddenFieldPageStatePersister.Load() +140
>
> [ViewStateException: Invalid viewstate.
> Client IP: 156.12.154.213
> Port: 4212
> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR
> 2.0.50727; .NET CLR 3.0.04506.30)
> ViewState:
> /wEPDwUKMTU5MTA2ODYwOWRkss85+lCwdpXAiRIXg3K0QPiFDCk =,/wEPDwUJNzM0NTM2OTI4ZGR70CFkynUOZFCdEqpCi5JMYQiXmw= =
> Referer: http://www.nathansokalski.com/screenscraper.aspx
> Path: /screenscraper.aspx]
>
> [HttpException (0x80004005): The state information is invalid for this page and might be
> corrupted.]
> System.Web.UI.ViewStateException.ThrowError(Except ion inner, String persistedState, String
> errorPageMessage, Boolean macValidationError) +116
> System.Web.UI.HiddenFieldPageStatePersister.Load() +240
> System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
> System.Web.UI.Page.LoadAllState() +35
> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
> includeStagesAfterAsyncPoint) +6953
> System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean
> includeStagesAfterAsyncPoint) +154
> System.Web.UI.Page.ProcessRequest() +86
> System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
> System.Web.UI.Page.ProcessRequest(HttpContext context) +49
> ASP.screenscraper_aspx.ProcessRequest(HttpContext context) +4
> System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +154
> System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +64
>
>
>
> --------------------------------------------------------------------------------
> Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
>
> The page is supposed to allow you to enter a URL and then display that page below the small form
> that is in my code, which is as follows:
>
>
> ScreenScraper.aspx:
>
> <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ScreenScraper.aspx.vb"
> Inherits="WebApplication1.ScreenScraper" EnableViewState="false" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>ScreenScraper</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <asp:TextBox ID="txtSourcePath" runat="server" Width="800px"/>
> <asp:Button ID="btnGetSource" runat="server" Font-Bold="True" Text="Get Source"
> Width="85px"/><br/><br/>
> <asp:Label ID="lblSource" runat="server"/>
> </form>
> </body>
> </html>
>
>
> ScreenScraper.aspx.vb:
>
> Partial Public Class ScreenScraper : Inherits System.Web.UI.Page
> Protected Sub btnGetSource_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
> Handles btnGetSource.Click
> Dim source As New System.Net.WebClient()
> Dim utf8 As New System.Text.UTF8Encoding()
> lblSource.Text = utf8.GetString(source.DownloadData(txtSourcePath.T ext))
> End Sub
> End Class
>
>
> Most of the web pages I could find about this error said it was related to ViewState, but my
> *.aspx file has EnableViewState="false" in the Page directive. My code works fine with every URL I
> have tried it with when it is the first URL I try, but the second one always gives me the error
> shown above. I tried everything I could think of, but nothing seemed to help. Although it may not
> be sufficient for other applications or pages, for this page just having a way to make it act as
> if it being opened for the first time would make it work (kind of like a reset or restart
> command?). Thanks.
> --
> Nathan Sokalski
> (E-Mail Removed)
> http://www.nathansokalski.com/
>




 
Reply With Quote
 
 
 
 
Nathan Sokalski
Guest
Posts: n/a
 
      12-10-2006
Other than the first time, doesn't it have to be a postback in order for
Page_Load to even get triggered? I know how to check whether something is a
postback, but since I am expecting this to always be a postback, I don't see
much point in checking since if btnGetSource_Click is being called I know it
is a postback, since I never call btnGetSource_Click from within the code.
If I am misunderstanding your suggestion, could you try posting it? The code
that you posted would not let the user specify the URL, and it would only do
one screenscrape. Thanks.
--
Nathan Sokalski
(E-Mail Removed)
http://www.nathansokalski.com/

"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:uGz1Pf$(E-Mail Removed)...
> Nathan,
>
> have you tried checking for IsPostback in the Page_Load event ?
>
> i.e., let the code run if it's *not* a Postback and if it *is* a Postback,
> not let it run.
>
> Sub Page_Load
>
> If Not IsPostBack
> ' your screen scrape code
>
> End If
> End Sub
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ===================================
> "Nathan Sokalski" <(E-Mail Removed)> wrote in message
> news:O3gCfM%(E-Mail Removed)...
>>I am recieving the following error on the second postback of a page I have
>>written:
>>
>>
>> The state information is invalid for this page and might be corrupted
>>
>> Stack Trace:
>>
>> [FormatException: Invalid character in a Base-64 string.]
>> System.Convert.FromBase64String(String s) +0
>> System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +72
>>
>> System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String
>> serializedState) +4
>> System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter,
>> String serializedState) +37
>> System.Web.UI.HiddenFieldPageStatePersister.Load() +140
>>
>> [ViewStateException: Invalid viewstate.
>> Client IP: 156.12.154.213
>> Port: 4212
>> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
>> CLR 1.1.4322; .NET CLR
>> 2.0.50727; .NET CLR 3.0.04506.30)
>> ViewState:
>> /wEPDwUKMTU5MTA2ODYwOWRkss85+lCwdpXAiRIXg3K0QPiFDCk =,/wEPDwUJNzM0NTM2OTI4ZGR70CFkynUOZFCdEqpCi5JMYQiXmw= =
>> Referer: http://www.nathansokalski.com/screenscraper.aspx
>> Path: /screenscraper.aspx]
>>
>> [HttpException (0x80004005): The state information is invalid for this
>> page and might be
>> corrupted.]
>> System.Web.UI.ViewStateException.ThrowError(Except ion inner, String
>> persistedState, String
>> errorPageMessage, Boolean macValidationError) +116
>> System.Web.UI.HiddenFieldPageStatePersister.Load() +240
>> System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
>> System.Web.UI.Page.LoadAllState() +35
>> System.Web.UI.Page.ProcessRequestMain(Boolean
>> includeStagesBeforeAsyncPoint, Boolean
>> includeStagesAfterAsyncPoint) +6953
>> System.Web.UI.Page.ProcessRequest(Boolean
>> includeStagesBeforeAsyncPoint, Boolean
>> includeStagesAfterAsyncPoint) +154
>> System.Web.UI.Page.ProcessRequest() +86
>> System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
>> System.Web.UI.Page.ProcessRequest(HttpContext context) +49
>> ASP.screenscraper_aspx.ProcessRequest(HttpContext context) +4
>>
>> System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute()
>> +154
>> System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
>> completedSynchronously) +64
>>
>>
>>
>> --------------------------------------------------------------------------------
>> Version Information: Microsoft .NET Framework Version:2.0.50727.42;
>> ASP.NET Version:2.0.50727.210
>>
>> The page is supposed to allow you to enter a URL and then display that
>> page below the small form
>> that is in my code, which is as follows:
>>
>>
>> ScreenScraper.aspx:
>>
>> <%@ Page Language="vb" AutoEventWireup="false"
>> CodeBehind="ScreenScraper.aspx.vb"
>> Inherits="WebApplication1.ScreenScraper" EnableViewState="false" %>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml" >
>> <head runat="server">
>> <title>ScreenScraper</title>
>> </head>
>> <body>
>> <form id="form1" runat="server">
>> <asp:TextBox ID="txtSourcePath" runat="server" Width="800px"/>
>> <asp:Button ID="btnGetSource" runat="server" Font-Bold="True"
>> Text="Get Source"
>> Width="85px"/><br/><br/>
>> <asp:Label ID="lblSource" runat="server"/>
>> </form>
>> </body>
>> </html>
>>
>>
>> ScreenScraper.aspx.vb:
>>
>> Partial Public Class ScreenScraper : Inherits System.Web.UI.Page
>> Protected Sub btnGetSource_Click(ByVal sender As System.Object, ByVal
>> e As System.EventArgs)
>> Handles btnGetSource.Click
>> Dim source As New System.Net.WebClient()
>> Dim utf8 As New System.Text.UTF8Encoding()
>> lblSource.Text =
>> utf8.GetString(source.DownloadData(txtSourcePath.T ext))
>> End Sub
>> End Class
>>
>>
>> Most of the web pages I could find about this error said it was related
>> to ViewState, but my
>> *.aspx file has EnableViewState="false" in the Page directive. My code
>> works fine with every URL I
>> have tried it with when it is the first URL I try, but the second one
>> always gives me the error
>> shown above. I tried everything I could think of, but nothing seemed to
>> help. Although it may not
>> be sufficient for other applications or pages, for this page just having
>> a way to make it act as
>> if it being opened for the first time would make it work (kind of like a
>> reset or restart
>> command?). Thanks.
>> --
>> Nathan Sokalski
>> (E-Mail Removed)
>> http://www.nathansokalski.com/
>>

>
>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      12-10-2006
re:
> My code works fine with every URL I have tried it with when it is
> the first URL I try, but the second one always gives me the error


Hi, Nathan.

I checked the page and what it produces is really curious.

I was able to get several pages in a row from my domain without problem.
Then I requested Microsoft's main page. No problem, either.
Then I requested Google's main page. It faulted with this error text :

---000---
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 ClientScriptManager.RegisterForEventValidation
method in order to register the postback or callback data for validation.
---000---

You might want to consider looking into that.

Also, I notice that you have different versions of the .Net Framework installed :
> Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210


That could certainly be a problem in many scenarios,
including the ones in your post and my response.

It looks like you installed SBS or some other Windows 2003 server OS
which was running a beta version of ASP.NET (version 2.0.50727.210),
and when you upgraded to the RTM/release, some part of the setup didn't complete.

It would be highly advantageous for you to fully upgrade to the RTM version (2.0.50727.42).

Running aspnet_regiis -i should do it( from the .Net Framework 2.0 directory ),
if you don't have ASP.NET 1.1 apps running.

If you do have ASP.NET 1.1 apps running, you can re-register them with
aspnet_regiis -s ( from the .Net Framework 1.1 directory )

Remember to run 1.1 apps and 2.0 apps in different Application Pools.

Re your comment about it always being a postback, yes, you're right.
Sorry for misunderstanding the purpose of the page.

Hope these comments help you sort the situation.



Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"Nathan Sokalski" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Other than the first time, doesn't it have to be a postback in order for Page_Load to even get
> triggered? I know how to check whether something is a postback, but since I am expecting this to
> always be a postback, I don't see much point in checking since if btnGetSource_Click is being
> called I know it is a postback, since I never call btnGetSource_Click from within the code. If I
> am misunderstanding your suggestion, could you try posting it? The code that you posted would not
> let the user specify the URL, and it would only do one screenscrape. Thanks.
> --
> Nathan Sokalski
> (E-Mail Removed)
> http://www.nathansokalski.com/
>
> "Juan T. Llibre" <(E-Mail Removed)> wrote in message
> news:uGz1Pf$(E-Mail Removed)...
>> Nathan,
>>
>> have you tried checking for IsPostback in the Page_Load event ?
>>
>> i.e., let the code run if it's *not* a Postback and if it *is* a Postback, not let it run.
>>
>> Sub Page_Load
>>
>> If Not IsPostBack
>> ' your screen scrape code
>>
>> End If
>> End Sub
>>
>>
>>
>> Juan T. Llibre, asp.net MVP
>> asp.net faq : http://asp.net.do/faq/
>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>> ===================================
>> "Nathan Sokalski" <(E-Mail Removed)> wrote in message
>> news:O3gCfM%(E-Mail Removed)...
>>>I am recieving the following error on the second postback of a page I have written:
>>>
>>>
>>> The state information is invalid for this page and might be corrupted
>>>
>>> Stack Trace:
>>>
>>> [FormatException: Invalid character in a Base-64 string.]
>>> System.Convert.FromBase64String(String s) +0
>>> System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +72
>>>
>>> System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String
>>> serializedState) +4
>>> System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter, String serializedState)
>>> +37
>>> System.Web.UI.HiddenFieldPageStatePersister.Load() +140
>>>
>>> [ViewStateException: Invalid viewstate.
>>> Client IP: 156.12.154.213
>>> Port: 4212
>>> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR
>>> 2.0.50727; .NET CLR 3.0.04506.30)
>>> ViewState:
>>> /wEPDwUKMTU5MTA2ODYwOWRkss85+lCwdpXAiRIXg3K0QPiFDCk =,/wEPDwUJNzM0NTM2OTI4ZGR70CFkynUOZFCdEqpCi5JMYQiXmw= =
>>> Referer: http://www.nathansokalski.com/screenscraper.aspx
>>> Path: /screenscraper.aspx]
>>>
>>> [HttpException (0x80004005): The state information is invalid for this page and might be
>>> corrupted.]
>>> System.Web.UI.ViewStateException.ThrowError(Except ion inner, String persistedState, String
>>> errorPageMessage, Boolean macValidationError) +116
>>> System.Web.UI.HiddenFieldPageStatePersister.Load() +240
>>> System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
>>> System.Web.UI.Page.LoadAllState() +35
>>> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
>>> includeStagesAfterAsyncPoint) +6953
>>> System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean
>>> includeStagesAfterAsyncPoint) +154
>>> System.Web.UI.Page.ProcessRequest() +86
>>> System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +18
>>> System.Web.UI.Page.ProcessRequest(HttpContext context) +49
>>> ASP.screenscraper_aspx.ProcessRequest(HttpContext context) +4
>>>
>>> System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +154
>>> System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)
>>> +64
>>>
>>>
>>>
>>> --------------------------------------------------------------------------------
>>> Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
>>> Version:2.0.50727.210
>>>
>>> The page is supposed to allow you to enter a URL and then display that page below the small form
>>> that is in my code, which is as follows:
>>>
>>>
>>> ScreenScraper.aspx:
>>>
>>> <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ScreenScraper.aspx.vb"
>>> Inherits="WebApplication1.ScreenScraper" EnableViewState="false" %>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>> <html xmlns="http://www.w3.org/1999/xhtml" >
>>> <head runat="server">
>>> <title>ScreenScraper</title>
>>> </head>
>>> <body>
>>> <form id="form1" runat="server">
>>> <asp:TextBox ID="txtSourcePath" runat="server" Width="800px"/>
>>> <asp:Button ID="btnGetSource" runat="server" Font-Bold="True" Text="Get Source"
>>> Width="85px"/><br/><br/>
>>> <asp:Label ID="lblSource" runat="server"/>
>>> </form>
>>> </body>
>>> </html>
>>>
>>>
>>> ScreenScraper.aspx.vb:
>>>
>>> Partial Public Class ScreenScraper : Inherits System.Web.UI.Page
>>> Protected Sub btnGetSource_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
>>> Handles btnGetSource.Click
>>> Dim source As New System.Net.WebClient()
>>> Dim utf8 As New System.Text.UTF8Encoding()
>>> lblSource.Text = utf8.GetString(source.DownloadData(txtSourcePath.T ext))
>>> End Sub
>>> End Class
>>>
>>>
>>> Most of the web pages I could find about this error said it was related to ViewState, but my
>>> *.aspx file has EnableViewState="false" in the Page directive. My code works fine with every URL
>>> I
>>> have tried it with when it is the first URL I try, but the second one always gives me the error
>>> shown above. I tried everything I could think of, but nothing seemed to help. Although it may
>>> not
>>> be sufficient for other applications or pages, for this page just having a way to make it act as
>>> if it being opened for the first time would make it work (kind of like a reset or restart
>>> command?). Thanks.
>>> --
>>> Nathan Sokalski
>>> (E-Mail Removed)
>>> http://www.nathansokalski.com/



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The state information is invalid for this page and might be corrupted. Benny Ng ASP .Net 2 10-07-2010 02:46 PM
The state information is invalid for this page and might be corrupted mwmorrison93@gmail.com ASP .Net 0 01-31-2007 07:35 PM
The state information is invalid for this page and might be corrupted mwmorrison93@gmail.com ASP .Net 0 01-31-2007 07:35 PM
ERROR: The state information is invalid for this page and might be corrupted Nathan Sokalski ASP .Net Web Controls 3 12-10-2006 01:12 PM
The View State Is Invalid for This Page and Might Be Corrupted Mike Turpin ASP .Net 1 07-16-2003 04:48 PM



Advertisments