Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

how to read cookies in Winforms

This is a discussion on how to read cookies in Winforms within the Development forums, part of the MapPoint Desktop Discussion category; Hi, I have Windows Application in which i want to read cookie set in the browser i am also attaching ...

  1. #1
    emailbhushan is offline Junior Member White Belt
    Join Date
    Mar 2009
    Posts
    2

    how to read cookies in Winforms

    Hi,


    I have Windows Application in which i want to read cookie set in the browser i am also attaching my code with question.

    What i am doing I am creating Windows user control which i place in ASP.Net application which read a cookie value from the client machine. But The User Control Display in the ASP.Net application can't read the cookie value. I am also attaching code which i am using in User Control ,

    textBox1.Text = "Hello";

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://127.0.0.1");



    //Uncomment the following statements to set up proxy, if have
    //request.Proxy = new System.Net.WebProxy("http://yourproxyservername: portnumber");
    //request.Proxy.Credentials = CredentialCache.DefaultCredentials;

    //Define an empty CookieContainer class object
    //before the HTTP request is sent
    request.CookieContainer = new CookieContainer();


    HttpWebResponse response = (HttpWebResponse)request.GetResponse();

    //Assign the Cookie property of the HttpWebResponse object to the original
    //CookieContainer object in the HttpWebRequest object
    response.Cookies = request.CookieContainer.GetCookies(request.Request Uri);
    foreach (Cookie cky in response.Cookies)
    {
    Console.WriteLine(cky.Name + " = " + cky.Value);
    MessageBox.Show(cky.Name + " = " + cky.Value);
    }

    Does any one have any idea about this?.. Please help

  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,832
    Blog Entries
    55

    Re: how to read cookies in Winforms

    Does this involve MapPoint?


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to read .shp files
    By shaileshganatra in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-10-2008, 07:46 PM
  2. WinForms and MapPoint
    By Eric Frost in forum News and Announcements
    Replies: 0
    Last Post: 01-12-2007, 07:44 AM
  3. Is there .NET WinForms Control for MapPoint
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-08-2004, 11:25 PM
  4. set note read-only
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-05-2003, 09:50 AM
  5. I have read you can zoom the map to any lat/long f....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-19-2001, 03:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81