简体   繁体   English

HttpHandler无法从.aspx页面的主体触发

[英]HttpHandler not firing from body of .aspx page

I have a http handler that is called from a .aspx page in the form 1x1 pixel image. 我有一个从.aspx页以1x1像素图像形式调用的http处理程序。 The handler has an extension of .jpg set up in the web.config. 该处理程序在web.config中设置了.jpg扩展名。 On all browsers apart from IE the http handler is called successfully from the body of the page when it loads. 在除IE之外的所有浏览器上,加载页面时都会从页面正文成功调用http处理程序。

However in IE the httphandler is not called. 但是,在IE中,不会调用httphandler。

If I call the http handler by entering the url in to the address bar in IE it works perfectly. 如果我通过在IE中的地址栏中输入url来调用http处理程序,则它可以正常运行。

Any idea why it might not work in the body of the page? 知道为什么它不能在页面正文中起作用吗?

IE may have it cached the image. IE可能已经缓存了图像。 If the filename of the .jpg isn't changing, I'd try to add a random query string to the end of it. 如果.jpg的文件名没有更改,则尝试在其末尾添加一个随机查询字符串。

http://<path>/0104924934404624104049.jpg?random=<unix timestamp>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM