Tests if website visiting uses cookie and code read contents

stephenwilde
stephenwilde used Ask the Experts™
on
Hi

Looking to code a test in .net c# that will test if webisites visited create a cookie and ideally read content of cookie that they leave on my machine

Any ideas on where I can start please

Rgds
Stephen  
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
This page http://msdn.microsoft.com/en-us/library/ms178194.aspx has a download for Visual Studio project code.  I suspect you have to 'look like a browser' to get the cookies from a web server.

Author

Commented:
Thanks for the link. But it is trying to get a handle on the code when you visit a website rather than when you are writing the code inside a website.

Fixer of Problems
Most Valuable Expert 2014
Commented:
You can only get a cookie when you visit a web site.  Cookies are part of the response to an HTTP request from a browser or a source that acts like a browser.  If you are trying to read cookies set by other web sites, that is strictly against the security rules in browsers.

Author

Commented:
Thanks - I will try another way

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial