hi guys

im trying to login to a webstie just with sending requests to the server .
the website has a login form which is this :

<form id="Form1" onsubmit="return Form1_onsubmit()" style="direction: rtl; text-align: right" action="./17717417412" method="post" name="Form1">
<input id="__VIEWSTATE" type="hidden" value="/wEPDwUKMTQ4MDM5MTkwMg9kFgICAQ9kFggCAQ9kFgYCBQ8WAh4JaW5uZXJodG1sZWQCBw8WAh8ABTvYp9iq2LXYp9mEINin2LIg2LfYsdmK2YI62LTYqNqp2Ycg2K/Yp9iu2YTZii3Yp9mK2YbYqtix2YbYqmQCCw8WAh8ABRk8Yj7bsduz27nbtC/bsduxL9ux27Q8L2I+ZAIFDxYCHgdWaXNpYmxlaGQCBw8WAh8BZxYCAgEPFgIfAAXXCdmC2KfYqNmEINiq2YjYrNmHINiv2KfZhti02KzZiNmK2KfZhiDZiNix2YjYr9mKINis2K/ZitivOjxici8+DQoxLdio2Ycg2YXZhti42YjYsSDYp9iz2KrZgdin2K/ZhyDYqNmH2YrZhtmHINin2LIg2LPYp9mF2KfZhtmHINii2YXZiNiy2LTZitiM2b7amNmI2YfYtNmKINmIINiv2KfZhti02KzZiNmK2Yog2K/Yp9mG2LTar9in2Ycg2LTZiti...jYp9mH2K8g2LTYry48YnIvPg0KNC3Yp9ix2KfYptmHINix2YrYstmG2YXYsdin2Kog2YXZgti32Lkg2YrYpyDZhdmC2KfYt9i5INmC2KjZhCDYr9ixINiy2YXYp9mGINir2KjYqiDZhtin2YUg2K3YttmI2LHZiiDYp9mE2LLYp9mF2Yog2YXZiiDYqNin2LTYrzxici8+DQo1Ldiu2YjYp9mH2LTZhdmG2K8g2KfYs9iqINin2LIg2YXYsdin2KzYudmHINit2LbZiNix2Yog2Ygg2KrZhNmB2YbZiiDYqNmHINmI2KfYrdivINmH2KfZiiDZhdiu2KrZhNmBINiv2KfZhti02q/Yp9mHINiv2LEg2K7YtdmI2LUg2YXZiNin2LHYryDYqNin2YTYpyDYrtmI2K/Yr9in2LHZiiDZgdix2YXYp9mK2YrYry4NCmQCCQ8WAh8ABQEgZGRDY9B9c/B5YHJtWvxroJcmLKB7mcNVjEPC771IlbjsIQ==" name="__VIEWSTATE">
<input id="__VIEWSTATEGENERATOR" type="hidden" value="C792DAE2" name="__VIEWSTATEGENERATOR">
<input id="__EVENTVALIDATION" type="hidden" value="/wEdAAV2jtM7qvfQnGzibIXMs/Xxa3XEE+61AoUroEwTw0TzoBeE+DS6Ew/rKBF70JLTBtZzH/l7PBvth6/ZzHDKK0R0S1f8aOOWPGzSVWaY7KNHgO7t9NXDgONroXff0Gi3QEEviwJ/CzErH/GkuwMuHfSX" name="__EVENTVALIDATION">

and when i submit this form in my browser i can see with fire-bug that it sends this request to the server :

request headers :

POST /sess/Script/Login.aspx HTTP/1.1
Host: sess.shirazu.ac.ir
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://sess.shirazu.ac.ir/sess/Script/Login.aspx
Cookie: ASP.NET_SessionId=e2vveqfcyrvwusn3uklcn4zm
Connection: keep-alive

request parameters:

Channel=Act=Ok;
_RKey=
__EVENTVALIDATION=/wEdAAV2jtM7qvfQnGzibIXMs/Xxa3XEE+61AoUroEwTw0TzoBeE+DS6Ew/rKBF70JLTBtZzH/l7PBvth6/ZzHDKK0R0S1f8aOOWPGzSVWaY7KNHgO7t9NXDgONroXff0Gi3QEEviwJ/CzErH/GkuwMuHfSX
__VIEWSTATE=/wEPDwUKMTQ4MDM5MTkwMg9kFgICAQ9kFggCAQ9kFgYCBQ8WAh4JaW5uZXJodG1sZWQCBw8WAh8ABTvYp9iq2LXYp9mEINin2LIg2LfYsdmK2YI62LTYqNqp2Ycg2K/Yp9iu2YTZii3Yp9mK2YbYqtix2YbYqmQCCw8WAh8ABRk8Yj7bsduz27nbtC/bsduxL9ux27Q8L2I+ZAIFDxYCHgdWaX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Zhdin2YrZitivLjxici8+DQozLdin2YbYqtiu2KfYqCDZiNin2K3YryDYtNmF2Kcg2KrZiNiz2Lcg2KjYrti0INmF2LHYqNmI2LfZhyDYp9mG2KzYp9mFINiu2YjYp9mH2K8g2LTYry48YnIvPg0KNC3Yp9ix2KfYptmHINix2YrYstmG2YXYsdin2Kog2YXZgti32Lkg2YrYpyDZhdmC2KfYt9i5INmC2KjZhCDYr9ixINiy2YXYp9mGINir2KjYqiDZhtin2YUg2K3YttmI2LHZiiDYp9mE2LLYp9mF2Yog2YXZiiDYqNin2LTYrzxici8+DQo1Ldiu2YjYp9mH2LTZhdmG2K8g2KfYs9iqINin2LIg2YXYsdin2KzYudmHINit2LbZiNix2Yog2Ygg2KrZhNmB2YbZiiDYqNmHINmI2KfYrdivINmH2KfZiiDZhdiu2KrZhNmBINiv2KfZhti02q/Yp9mHINiv2LEg2K7YtdmI2LUg2YXZiNin2LHYryDYqNin2YTYpyDYrtmI2K/Yr9in2LHZiiDZgdix2YXYp9mK2YrYry4NCmQCCQ8WAh8ABQEgZGRDY9B9c/B5YHJtWvxroJcmLKB7mcNVjEPC771IlbjsIQ==
__VIEWSTATEGENERATOR=C792DAE2
banner:zzChanel=
edId=s9332045

and this is the response :

HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=utf-8
Location: /sess/205038594699
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 03 Feb 2016 19:35:02 GMT
Content-Length: 135

i want to know how should i send this request using XMLHttpRequest to get this exact response from the server ?

thanks in advanced :)

i tried all the ways i know but still cant get the response . any help guys ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.