http://www.aspcool.com/lanmu/browse.asp?bbsuser=aspnet

解决方案 »

  1.   

    我开发的不是b/s结构的程序,是普通应用程序,没有请求、响应机制,我要做的就是把本机上保存的Cookie信息读取出来
      

  2.   

    HttpCookie类,不知道能不能在winform里面用,如果不能,有一个折衷的方法:在你的winform里面镶入一个webbrowser
      

  3.   

    1.读取注册表,获取cookie保存位置
    2.象读取文本文件一样读出cookie文件;
    3.作相应处理。 ==》可否?
      

  4.   

    我也知道,Cookie是一系列文本文件,存放在指定的目录下,不过有些信息是加密的,我得知道他的规则才能直接通过读取这些文件得到!
      

  5.   

    using System;
    using System.Text;
    using System.Runtime.InteropServices;
    class TestCookie
    { [DllImport("wininet.dll", CharSet=CharSet.Auto, SetLastError=true)]
    public static extern bool InternetGetCookie(
         string lpszUrlName,
         string lpszCookieName,
         StringBuilder lpszCookieData,
         ref uint lpdwSize
    );
    [DllImport("kernel32.dll")]
    internal static extern Int32 GetLastError(); public static string GetCookie(string url)
    {
    StringBuilder sb = new StringBuilder(1000);
    uint size = 1000;
    bool bGood = InternetGetCookie(url,"", sb,ref size);
    if (!bGood)
    Console.WriteLine("Error code:{0}", GetLastError()); return sb.ToString();
    }
       public static void Main()
       {
    Console.WriteLine(GetCookie("http://expert.csdn.net"));
       }
      

  6.   

    我现在 很想知道什么时候要调用API,请高手指点