c# - IE8 won't download a file with a custom mime/type with UAC enabled -


I have a pure service run on a local machine (Windows 7 x64, IE8, .NET 3.5, C #) That gives a file on the browser in response to the action of the user. Using Firefox or Chrome, the file is downloaded properly and our app launches through custom mime type and all is fine.

However, with IE8, I receive a dialog "Unable to download from the file. Open this internet site. The requested site is either unavailable or can not be found later. Try it. "

By using intelligence, I have verified that the IE receives the payload from the service

If I close the UAC, download the IE file And launch the related app Is obtained.

Turning off the UAC is not a viable solution, because our customers will be able to do this.

How can I get IE8 to launch an application with UAC?

Edit:

After re-registering the mime type as a programmatic ID, open the "Open or Save" dialog to open IE IE for the second time the address bar Can be requested for link from. Why does not this work for the first time?

Today I was able to solve this issue. It has been found that codebehind was establishing the property of the answer to CacheControl to HttpCacheability.NoCache . Problem solved by removing that line of code Correcting the mime type and file extension with the second half of the fix was entering correctly.

I just stripped the answer to the content-nature: attachment; File name = xxx and a binary writing of string data. IE displays the Open or Save dialog box correctly, even if Mime Snaff reported the file as text / html (which should actually be text / plain).

I added back to the content type header and then retested, then the nosniff option and retested and finally the cache control. In the midst of each trial, I wanted to reboot the VM again to ensure that it was an ancient test environment (i.e. not cached or preloaded). Only the Cash LC affected the behavior in negative fashion.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -