Last post Nov 07, 2018 02:35 AM by Fei Han - MSFT
Nov 06, 2018 09:25 AM|santiago17|LINK
I have developed an asp.net mvc web application and publish it to azure. The application allows users to upload files to the application that are kept in specific server directories, that they can open at any time.
Nevertheless, when users attach .msg files (saved emails from Outlook) and try to open them they get an "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable." error.
I've tried to change the mime type in my web.config file like this:
<mimeMap fileExtension=".msg" mimeType="application/octet-stream" />
but the problem persists. When I run the web application in my local development environment I get the same error.
Can anyone help me on this.
Nov 06, 2018 10:35 AM|kaushalparik27|LINK
I suspect it has something to do with routing in your application. I suggest you refer to RouteConfig.cs file.
Here are some related links, if you find them useful:
Nov 06, 2018 12:01 PM|PatriceSc|LINK
This is ASP.NET 4.x with MVC 5 ? Beyond the mime type config, I see storing files in a special directory such as App_Data or configuring ASP.NET so that physical files are processed as well with the routing system (RouteExistingFiles=true).
What if you try a .htm file in the same directory ? If it still doesn't work why if you try an .htm file in another directory?
Nov 07, 2018 02:35 AM|Fei Han - MSFT|LINK
You can try:
<mimeMap fileExtension=".msg" mimeType="application/vnd.ms-outlook" />