FiddlerCore注意事项

Fiddlercore 使用说明
Fiddlercore不保留session序列,因此要自己保存。并且要注意网页session不会被垃圾回收,因为oAllSessions List保持活动引用,因此要时常trim。另一种选择,若仅仅关系请求url或者请求头,只保存一个list<>而不是存储对全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的线程异常的状态

原文地址:https://www.cnblogs.com/dennysong/p/5671810.html