Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         TridentAgent.InternetSetCookie("http://www.edward44444.com", "JSESSIONID", "Name=edward;Expires=" + DateTime.UtcNow.AddMinutes(1).ToString("R"));
         int           dataSize = 1000;
         StringBuilder sbCookie = new StringBuilder(1000);
         TridentAgent.InternetGetCookie("http://www.edward44444.com", "JSESSIONID", sbCookie, ref dataSize);
         Response.Write(sbCookie.ToString());
     }
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //HttpHelperTest();
            //WebPageCapturer caputer = new WebPageCapturer(1024, 768);
            //Bitmap image = caputer.Capture("http://www.baidu.com/",3000);
            //image.Save("1.jpg");

            TridentAgent.InternetSetCookie("http://www.edward44444.com", null, "Name=edward;Expires=" + DateTime.UtcNow.AddMinutes(1).ToString("R"));
            int           dataSize = 1000;
            StringBuilder sbCookie = new StringBuilder(1000);

            TridentAgent.InternetGetCookie("http://www.edward44444.com", null, sbCookie, ref dataSize);

            //CommonCacheDependencyTest();
            //FtpClientTest();

            //ImageFormatInspectorTest();

            //Console.Read();
        }