Working with Excel file in MVC

I am in Internet Explorer 8 using MVC 1 and IIS 7.

I have an action on the controller that is serving the excel file.

I go to action, a dialog box appears asking if I want to save or open the file, and I select open.

Then Excel makes a HEAD request to the server, then a password prompt is opened, then a directory is raised and an OPTIONS request is issued, followed by 5 PROPFIND requests. Then, if I cancel the password prompt, the excel document opens normally and makes one last HEAD request to the source directory.

What is happening and how to stop it? Can I do something in global.asax or my web.config to massively block all of these HEAD / OPTIONS / PROPFIND requests that Excel does? I do not have access to make changes to the web server.

+4
source share
1 answer

This happens in office documents, where microsoft programs try to open a file from the server itself. He then tries to authenticate and send requests such as OPTIONS and PROPFIND to get the server type and tool for real-time editing and updating the local copy from the server, etc. In principle, this is done for synchronization.

How do you stop this? I don’t know, you may have to look at the settings in your local excel tool.

How do you block certain requests in global.ascx? What is the advantage of locking, instead of just leaving it, your application doesn't seem to be using the request anyway. I would like to receive an answer to this question.

+2
source

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


All Articles