Client VBScript and Viewstate for ASP .NET Webpage

J

Joseph Morales

I'm trying to code a free-standing VBScript, executed by Windows Script Host
on a client system, to push a button on an ASP .NET webpage that is hosted
by another server. Note that the script is not part of a webpage and does
not execute in a web browser. Instead, the script uses Msxml2.XMLHTTP to
send an HTTP request. To figure out what to include in the request body, I
used a Proxy Trace utility and captured the data that is sent when you push
the button we want on the webpage in a browser. I was able to make a script
that works temporarily.

However, on subsequent days, the script stops working. I found that if I do
a Proxy Trace again, the Viewstate data in the body has changed. Why would
the Viewstate data be different on different occasions, if all the controls
on the form have the same values?

I asked the developer of the webpage, and he said they did not request
encryption not did they use the ViewStateUserKey. The Viewstate should be
behaving according to its defaults. Is there something that causes the
Viewstate to vary from session to session? If so, how can my client script
know what Viewstate data to pass?

Thanks!
 
B

Bruce Barker

the viewstate is varied on every page render, and the matching viewstate
must be posted. before posting a page, you should go a get, parse out the
viewstate and send it back. its encrypted so that client apps like yours can
not modifiy it.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top