caching-application-block

Caching Application Block crashing IIS

一世执手 提交于 2019-12-11 06:27:33
问题 I'm having an issue with my Dev environment where any calls to the Caching Application Block's CacheFactory cause IIS to crash. I've created a very simple web application that causes IIS to crash every time I try to run it, but yet the application works fine under the Visual Studio.NET web server. The following code is what causes the application to crash when running under IIS: protected void Page_Load(object sender, EventArgs e) { try { ICacheManager cm = CacheFactory.GetCacheManager("foo")

Cannot Access Closed Stream

五迷三道 提交于 2019-12-04 02:59:41
问题 I'm trying to use the Caching Application Block to cache some images (these images take a long time to render) BitmapSource bitmapSource; ///some bitmap source already created _cache /// Caching Application Block String someId; //id for this image, used as the key for the cache using (var stream = new MemoryStream()) { PngBitmapEncoder encoder = new PngBitmapEncoder(); encoder.Interlace = PngInterlaceOption.On; encoder.Frames.Add(BitmapFrame.Create(bitmapSource)); encoder.Save(stream); _cache