Help...Replicating IE HTTP protocol to communicate with ASP.NET

T

Tim Smith

Hi,

We have an ASP.NET web application which is suffering performance
problems. Since setting up robot scripting interacting with the
browser would take a while I hoped I could open a two-way socket with
IIS and replicate the HTTP session information e.g. starting out with

POST /192.168.1.1/login.aspx HTTP/1.1\r\n
Accept-Language: en-us\r\n
ontent-Type: application/x-www-form-urlencoded\r\n
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET
CLR 1.0.3705)\r\n
Host: 192.168.1.1\r\n
ontent-Length: 68\r\n
Connection: Keep-Alive\r\n
Cache-Control: no-cache\r\n
Cookie: ASPSESSIONIDAAATDTQR=OGEFBLJCPEPCNFHMJGPHBCDJ;
ASP.NET_SessionId=ko3ozjqyqb1lbu454cxrf3ft;\r\n
\r\n__EVENTTARGET=&__EVENTARGUMENT=&usersid=abcde&passwd=12345&test=Login


When I network sniff IE I see the ASPSESSIONIDAAADTQR, without it I
get a security timeout from the server. I could probably comment out
that code but can I generate than value from somewhere?? Do I need
more than the SessionId to make this work. Is this all even possible?
 
R

Roger Willcocks

Make an initial request to the server, no cookie, to an unsecured page
then the response should contain a Set-Cookie: header that will tell you
what to use.

ASPSESSIONID<STUFF> is for ASP not ASP.NET session management
the <STUFF> bit changes every time the server/site process restarts
 
B

bruce barker

if you do the first GET, asp.net will send the cookie values need for the
rest of the session. to do postback (POST) you will need to send the hidden
__Viewstate field that came from the matching GET.

-- 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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top