How to clear the client-side .Net SSL session cache

后端 未结 2 764
花落未央
花落未央 2021-02-19 18:56

I am writing a little test tool, which uses HttpWebRequest to load test a server. I want for each time I try to call HttpWebRequest.GetResponse() for it establish a fresh SSL se

2条回答
  •  忘了有多久
    2021-02-19 19:34

    I think you're looking for the HttpRequestCacheLevel Enumeration value NoCacheNoStore

    http://msdn.microsoft.com/en-us/library/system.net.cache.httprequestcachelevel.aspx

    You can then overwrite the HttpRequestCachePolicy

    http://msdn.microsoft.com/en-us/library/system.net.webrequest.cachepolicy.aspx

提交回复
热议问题