Link to home
Start Free TrialLog in
Avatar of iamtheiam
iamtheiam

asked on

Is there a way to automatically login to this site using webclient or HttpWebRequest (VB.NET)

I am trying to automatically login into https://www.allianzlife.com/default.aspx Is there a way to automatically login to this site using webclient or HttpWebRequest (VB.NET)?
Avatar of iamtheiam
iamtheiam

ASKER

Here's the POST from ieHTTPHeaders I substitued the username and password with <<MYUSERNAME>> and <<MYPASSWORD>>

POST /Security/LogIn.aspx HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: https://www.allianzlife.com/Security/LogIn.aspx
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2)
Host: www.allianzlife.com
Content-Length: 529
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: __utma=95122124.1050789322859852100.1242950361.1243006370.1243006528.9; __utmz=95122124.1242950361.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=95122124.1.10.1243006528; __utmc=95122124; ARPT=QJINLJSp225CYWK; ASP.NET_SessionId=ul5q0ryqytc0k445rqqa3hvs; IS_SSO_USER=

__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUJMTcyODM4NTMyD2QWAgIBD2QWAgILD2QWAmYPZBYEAgEPDxYCHgdWaXNpYmxlaGRkAgIPZBYCAgIPDxYCHwBoZBYCZg8PFgIeBFRleHQFDzAgaXRlbXMgaW4gY2FydGRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBShQYWdldGVtcGxhdGUxOnJlbWVtYmVyTXlVc2VybmFtZUNoZWNrQm94kQyYgcd31J9j4iKaQsNdPGy%2B6Ps%3D&Pagetemplate1%3AusernameTextBox=<<MYUSERNAME>>&Pagetemplate1%3ApasswordTextBox=<<MYPASSWORD>>&Pagetemplate1%3AlogInButton=LOGIN&__EVENTVALIDATION=%2FwEWBQKQvuzBDQLB56XXBQKz6sybDAKOqfmFDwKPvdfKDg1RVV7Forax2mpRwi%2BruTXOpoWn

SOLUTION
Avatar of Nirmalan Nagenthiran
Nirmalan Nagenthiran
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks guys