Opening an Excel file in IE triggers three inputs?

I have a classic ASP website that submits a form to a page, which then generates and passes the Excel file to users. In fact, its the raw HTML table that I am posting with:

Response.AddHeader "Content-Disposition", "inline; filename=file.xls" Response.AddHeader "Content-Type", "application/vnd.ms-excel" 

The intranet website is secured with integrated Windows authentication. There is no other access mode. The user logs in with his network password, and everything is fine.

Now, when the user submits the form, this action leads to two more login dialogs. You can actually drop both and still open the file. In fact, if you enter your credentials, you will need to enter them four times! If you check "Remember password", this will not affect the need to log in. This also happens even if the URLs are listed in the Trusted Sites section of IE.

Any ideas on what I can do to keep this to a minimum?

PS: Not sure, but it seems to be a relatively recent issue, which means a newer version of IE (7/8), Office (2007+), and Windows (Vista / 7).

UPDATE: Using Fiddler, I see that something called "User-Agent: Microsoft-WebDAV-MiniRedir / 6.1.7600" is trying to connect and get 401.2. Is IE loading the download on something else that is not authenticated properly?

UPDATE2: Interestingly enough, Firefox does nothing. He correctly perceives and interprets:

 HTTP/1.1 200 OK Date: Mon, 21 Feb 2011 19:25:26 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Disposition: inline; filename="SavingsReport_4Q2010.xls" Content-Type: application/vnd.ms-excel Content-Length: 111851 Cache-control: private 
+4
source share
1 answer

An old question, but here it goes if someone stumbles upon it.

Office tries to authenticate with the file server through an OPTIONS request to access the file, as described in this article .

Without a full understanding of why changing content from inline to attachment will not require authentication in most environments.

Be careful, as this seems to affect the file name (on win XP - IE7. For example, a file named file name.xls will open as file_name.xls

Here is an example of classic ASP code:

 Response.AddHeader "Content-Disposition", "attachment; filename=MyReport.xls" 
+2
source

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


All Articles