Downloading an Http file fails if you have been idle for too long after loading a page (asp.net mvc)

So this is weird.

I have this page that has a download control in it. Downloading the page, you select the file, and the download is normal, all the time every time.

Except that you wait two minutes after the page loads (so don't do anything for 2 minutes), the download will always work.

I started tracing the client network, and one thing I noticed was that the server response suddenly represents 401 from Microsoft-HTTPAPI-2.0 instead of IIS:

Network trace

Authentication is set to Windows Authentication (in IIS 8.0)

This only happens in IE (11), Chrome doesn't seem to have this problem, so I think this is the client side.

+5
source share
1 answer

I ended up calling the dummy controller method every 10 seconds from the client. This seems to have solved the problem for me.

0
source

Source: https://habr.com/ru/post/1247368/


All Articles