Question : HttpWebRequest Form Authentication Not Getting Past Login Page

Hello,

I am trying to use the POST method with a HttpWebRequest object while passing in real login credentials and am failing to get past the login page. (The credentials down there are real, but not mine personally =D)

I got the same code to work for Totsy.com but cannot get it to work for Zulily.com.

Any help in getting past the login page so I can retrieve the after login page would be much appreciated.

Thanks,
Mohammed
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
Dim strUrl As String = "https://www.zulily.com/index.php/customer/account/login/"

ServicePointManager.Expect100Continue = False
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3

Dim webRequest As HttpWebRequest
Dim responseReader As StreamReader
Dim responseData As String
Dim postData As String = "[email protected]&pass=pass1234"
Dim cookies As CookieContainer = New CookieContainer()
Dim requestWriter As StreamWriter

'post form data to page
webRequest = HttpWebRequest.Create(strUrl)
webRequest.Method = WebRequestMethods.Http.Post
webRequest.ContentType = "application/x-www-form-urlencoded"
webRequest.CookieContainer = cookies
webRequest.ContentLength = postData.Length

requestWriter = New StreamWriter(webRequest.GetRequestStream)
requestWriter.Write(postData)
requestWriter.Close()

'recieve cookie
webRequest.GetResponse().Close()

'now we send the cookie
webRequest = HttpWebRequest.Create("http://www.zulily.com/index.php/")
webRequest.CookieContainer = cookies
responseReader = New StreamReader(webRequest.GetResponse.GetResponseStream())
responseData = responseReader.ReadToEnd()
responseReader.Close()

SpillLabel.Text = Server.HtmlEncode(responseData)

Answer : HttpWebRequest Form Authentication Not Getting Past Login Page

no, decode can't do a "between",  but you can use case

select ms.pid, pe.eligid,ms.fname,ms.lname,ms.dob,me.coveragebegindate,
pa.programid, rf.programname,pa.workflowstatus,rfw.programworkflowstatusdesc,
case when pa.workflowstatus between 100 and 400 then 'Active' end
Random Solutions  
 
programming4us programming4us