Fiddlercore 使用說明
Fiddlercore不保留session序列,所以要本身保存。而且要注意網頁session不會被垃圾回收,由於oAllSessions List保持活動引用,所以要時常trim。另外一種選擇,若僅僅關係請求url或者請求頭,只保存一個list<>而不是存儲對全session的一個活動的引用session
// Inside your main object, create a list to hold the sessions // This generic list type requires your source file includes #using System.Collections.Generic. List<Fiddler.Session> oAllSessions = new List<Fiddler.Session>(); // Inside your attached event handlers, add the session to the list: Fiddler.FiddlerApplication.BeforeRequest += delegate(Fiddler.Session oS) { Monitor.Enter(oAllSessions); oAllSessions.Add(oS); Monitor.Exit(oAllSessions); }; // Call Startup to tell FiddlerCore to begin listening on the specified port, // and optionally register as the system proxy and optionally decrypt HTTPS traffic. Fiddler.FiddlerApplication.Startup(8877, true, true); // Call Shutdown to tell FiddlerCore to stop listening on the specified port, and // unregister as the system proxy if attached. Fiddler.FiddlerApplication.Shutdown();
exe.config中添加
<legacyUnhandledExceptionPolicy enabled="1"/>
能使程序回到net1.0或1.1的線程異常的狀態ide