Streaming Databased Images Using HttpHandler

前端 未结 3 1933
深忆病人
深忆病人 2020-11-28 14:51

For a long time now I have noticed something annoying when working on Web Application projects involving databased images on my local machine. By local I mean that it\'s a t

3条回答
  •  佛祖请我去吃肉
    2020-11-28 15:41

    I finally got all images to render by changing the value of the IsReusable property to true:

        public bool IsReusable
        {
            get
            {
                return true;
            }
        }
    

    Apparently, this keeps the handler in memory and able to handle multiple requests. When set to false, it had to create a new instance of the handler for each incoming request.

提交回复
热议问题