IE6 opening XLSX file as an XLS file - vb.net

My application generates XLSX files based on a users requirements.
After the XLSX file is generated the user is redirected to where the file is saved using Response.Redirect...
Response.Redirect("filename.xlsx")
When the user then opens the file... they recieve this message.
The file you are trying to open, 'filename.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
As a temporary fix I've instructed my users to press "Yes" when they receive this message and the file opens perfectly fine.
Does anyone have any ideas why IE6 is trying to open an XLSX file as an XLS?
Note: I have a similar application that generates PPTX files in the same manner - and these open without a problem.

I've found that it is an issue with older versions of windows server.
Both the xlsx MIME type needs to be added and there are also a couple driver updates that need to be installed (I don't know specifically which ones. Our IT department is taking care of it)
To add the MIME type: Go to IIS Manager and add the .xlsx MIME type. (Documentation).
The MIME type that needs to be added is:
File Extension: .xlsx
MIME Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Further information on this can be found here: http://technet.microsoft.com/en-us/library/ee309278(office.12).aspx

I think, you cannot solve that problem by hosting or etc. it depend on your computer...
Here is the fix from Microsoft website ;
To configure Internet Explorer to open Office files in the appropriate Office program by using the Folder Options tool:
Open My Computer.
On the Tools menu (or the View menu), click Folder Options (or click Options).
Click the File Types tab.
In the Registered file types list, click the specific Office document type (for example, Microsoft Excel Worksheet), and then click Advanced (or click Edit).
In the Edit File Type dialog box, click to clear the Browse in same window check box (or click to clear the Open Web documents in place check box).
Click OK.
Here is the link http://support.microsoft.com/?scid=kb%3Ben-us%3B162059&x=13&y=13

Related

TFS2015 Document library- open file instead of download

when i am trying to view files from my TFS document library it's download the file instead of opening it automatic with excel OR word that are already installed on my pc, does someone know how to fix it?
i am using office365 and TFS2015 as you can see at the screenshot that attached this is how it's look like in PC that working fine.
This kind of issue may related to your IE security setting, try to add the related sharepoint site in trust site and try again:
Close your browser (if you don't and you have your SharePoint site up you'll get a bunch of script errors because of the change to access
levels).
Go to your Control Panel
Open Internet Properties
Select the Security tab.
Select Trusted Sites
Click Sites, and add the URL for your SharePoint site.
More details please refer this similar issue: "Some files can harm your computer" dialog when I open a file from the document library
If the warning dialog is disappear, but when you open file still download. Then that behavior maybe defined by your browser. Try some other browser such as IE/Chrome/FireFox. Double check the integration/link of your browser and Word,Excel.

File in Internet Explorer 11 opened from source URL instead of tempory folder

I would like you to help me to understand this situation. From a web application (ASP.NET MVC), I generate files in docx and xlsx. In Internet Explorer (V11) it show a box asking if user want to "Open", "Save" or "Save as" this file. When user select "Open", it open the file in Microsoft Word (or Excel), but the file is not in Internet Explorer's temporary file folder. File point toward the web application URL. This cause an issue when user "Enable Editing" on this opened docx or xlsx file. The "Enable Editing" action change the content of the file for the login page of the web application, which is wrong.
The issue doesn't happend in Chrome or Firefox, nor if user "Save" or "Save as" files. Too, it doesn't happend on all PCs.
Until now I did: compare IE advance setting with a working PC, compare IE security setting with a working PC, reset IE settings and opened a docx file from GMail (the issue didn't happen)
I use Microsoft office 2013
Thanks for your advices
I found the answer.
In my code I didn't have the Response header "content-disposition" when generating files.

How to Browse Local Folder Path web forms

I want to save file in my local system.
This purpose i need to choose directory where the file want to save.
I want the choosing folder path.
I didn't find any web controls please help me. windows from control is not working in web forms.
I have tied using FolderBrowserDialog control but it is not working in MVC
There is no such control (except using ActiveX Control or Java Applets), so don't waste your time to look for it and you can not get any folder path(on client machine) with JavaScript due to security reasons.
Why don't you just allow user to download the file and user will select the folder where he wants that file to be saved or else it will get saved in default folder of browser.
Hope it helps, thanks.

WebDav Pdf Saving error

I have set up a webdav folder that I can access thorugh chrome and edit files and save them back to the server, for example, I can open a word doc, edit it and save it back.
When I come to open a pdf, it wont save back to the server and downloads a copy of the pdf instead of the original.
Is there a way of enabling this to edit a pdf?
My end goal is to be able to open a pdf, add comments/highlights and save it back to the server, through my browser.
Thank you
Edit:
I have set this up through Apache 2.4, no plug ins through chrome, I have mapped a network drive to the server folder where I can open and edit files. Except PDFs, I would like to add comments to a off but when I open one the option is greyed out and when I try and save it after opening it tries to save to my desktop.
I'm not sure i've got your use case right, but if i've understood you correctly you have a link in a web page to a PDF which you're viewing in chrome. You click on that link and the PDF downloads to a temp file from which it is opened. If you edit and save those changes are simply saved to the temp file on your local PC. Is that correct?
If so, then this is simply normal behaviour for links in web pages. There is absolutely nothing in the HTML standard which suggests links should be opened by an editor with knowledge of the source location.
What you really want is for the link to launch an editor program which retrieves the remote document in edit mode (probably locking the remote resource) and then have edits saved back to the server. For this to happen there generally needs to be some special interaction in the browser. In Internet Explorer this is provided by the sharepoint dll and special script code. I think there's a plugin for Chrome which does the same thing, although differently.
I havent used the Chrome plugin, but i think this might help - https://code.google.com/p/npapi-msdocs/

Can I open any Application with this code in windows phone?

I would like to programmatically open an app in windows phone.
i found the following code to open an excel file:
var wbt = new WebBrowserTask();
wbt.URL = "http://example.com/file.xlsx";
wbt.Show();
could I use this code to open an .exe file?
Your code does not programmatically open an app. Instead, it opens a web browser, navigates it to the xlsx file URI. Then, Internet Explorer recognizes file type from either extension or MIME type, and launches Excel.
With exe file, you’re only gonna get a message saying something like “Unsupported file format”.