开发者

Prevent ASP.NET GET request timeout?

开发者 https://www.devze.com 2022-12-17 07:12 出处:网络
I\'ve got an ASP.NET application that serves MP3 content, but that content is generated during the request and can delay the sending of the response\'s first byte by several minutes.

I've got an ASP.NET application that serves MP3 content, but that content is generated during the request and can delay the sending of the response's first byte by several minutes.

开发者_JS百科The client is a podcatcher (I don't know which), and the lowest timeout I've seen is 20 seconds. That is, these clients are (reasonably enough) giving up relatively quickly, assuming there's no response coming.

How can I keep these clients from giving up? How can I let them know a response is coming?


If you're serving up the content in a binary format, you should be able to format the headers and push them out right away before you even have the binary content organized. If you're using a handler, you can speed up the process by avoiding a lot of IIS overhead, and at the same time you can get the content-headers started (not completed, but started) and use a Response.Flush() to get them out.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号