How can current Session can be sent with the WebRequest!
-
I had posted this question couple of days ago but still not able to get the answer. I want to Get HTML by Executing URL on Server. I have got the HTML but problem is this Current Session Values are not being sent. I can't use query string I have to use current sessoin values!!! Any Help will be highly appricated!!!
-
I had posted this question couple of days ago but still not able to get the answer. I want to Get HTML by Executing URL on Server. I have got the HTML but problem is this Current Session Values are not being sent. I can't use query string I have to use current sessoin values!!! Any Help will be highly appricated!!!
Perhaps it would help if you were a little more specific about what you're doing... Are you normally able to read session values on different pages of the same application? If so, what is different about what you're doing in this case? Fred
-
Perhaps it would help if you were a little more specific about what you're doing... Are you normally able to read session values on different pages of the same application? If so, what is different about what you're doing in this case? Fred
Thanks for ur reply! Actually my code is!
Dim objWebClient As New WebClient Dim aRequestedHTML() As Byte aRequestedHTML = objWebClient.DownloadData(strURL) Dim objUTF8 As New UTF8Encoding Dim strRequestedHTML As String strRequestedHTML = objUTF8.GetString(aRequestedHTML) GETHTMLStream1 = strRequestedHTML
The request(URL) is sent to the server which returns the HTML. Now Problem is this request doesn't able to retrieve session values. Session values are being reterieved on other pages. -
Thanks for ur reply! Actually my code is!
Dim objWebClient As New WebClient Dim aRequestedHTML() As Byte aRequestedHTML = objWebClient.DownloadData(strURL) Dim objUTF8 As New UTF8Encoding Dim strRequestedHTML As String strRequestedHTML = objUTF8.GetString(aRequestedHTML) GETHTMLStream1 = strRequestedHTML
The request(URL) is sent to the server which returns the HTML. Now Problem is this request doesn't able to retrieve session values. Session values are being reterieved on other pages.Well no, it won't... Session values (SessionID anyway) are passed back and forth between the browser and the server whenever a page is requested - a form of cookie; this is how it knows which session values belong to which client - and just passing the URL to the server won't send the session values too. You'll need to re-think your model.... Fred
-
Well no, it won't... Session values (SessionID anyway) are passed back and forth between the browser and the server whenever a page is requested - a form of cookie; this is how it knows which session values belong to which client - and just passing the URL to the server won't send the session values too. You'll need to re-think your model.... Fred
Do you have any suggestion regarding this!!!:confused:
-
Do you have any suggestion regarding this!!!:confused:
Not really, I'm afraid.. if you really need to do it this way, I guess you'll have to pass the session variables as paramters of the url - if you're worried about security, you'll need to encrypt them first. Either that, or go back to the drawing board and see if there isn't another way to achieve whatever it is you're trying to do... Good luck - sorry I cna't be more help... Fred