I have created an application that has a function to get stock detail. It is created to post data on an HTTPS site.
I want to maintain the session state and cookies in this call. How can I do this task?
I have the session in point 1. Point 2 invokes the function and the function loses the session and cookies.
How do I pass session to the web request URL? The web request happens in the same application server.
Here is my code:
Function getStockDtl()
session("stockid")="123456"
Dim url As String = "some url.aspx"
Dim req As WebRequest = HttpWebRequest.Create(url)
Dim sread As New StreamReader(req.GetResponse.GetResponseStream)
Dim RString As String = sread.ReadToEnd
End Function