Keep track of Session from program

  • Thread starter Thread starter Q.Z
  • Start date Start date
Q

Q.Z

We have a client who has a web site which collect consumer
information from Internet for example mortgage
application. And my company likes to sell our consumer(who
filled the application through our site) information to
them. One of the option is to simulate the consumer by
posting data to our client's web site. I can post the data
to the site but my question is how do I simulate session
cookies?

Thanks
Qin Zhou
 
cookies are just a header records in the post and response. when you hit
your site, it will respond with a cookie header, just use this on the next
post.

-- bruce (sqlwork.com)
 
Hi Q.Z,


Thank you for using Microsoft Newsgroup Service. Based on your description,
you've got a client application(ASP.NET web application) which gather
customer's info via web. Also, you've another application that will post
some customers' info via web client component(simulate a user serve the web
application). However, you are wanting to know how to simulate the cookie
to maintain the session with the web application server? Please correct me
if my understanding is note quite accurate.

As for the problem, generally the web application has serveral means to
maintain session between separately requests for the client.:
using cookie, url appending...
If the cookie is allowed in client, as bruce barker said, the web
application will stored cookie info in the http request and response's
header area. The server just use retrieve the cookie info from the header
datas and then retrieve the correct session for the certain client. As for
your situation, you are using the web client component to simulate a
client. Since you can get the whole http request and response message, you
should maintain those datas in header area when getting the response from
the server and then put them in the request next time you want to post to
the server. Also, you can do a simple test first to try out the suggestion
if you are not sure at them.

If you have any questions on the preceding description, please feel free to
let me know.



Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top