I am using MVC 3 Razor, and i am getting a "save as" dialog with a "unknown file type" and the content is the Html Page once in a while on multiple pages on the site, this dialog shows on IE, and on Firefox it shows an Error page that says "XML Parsing Error" .
sometimes when the "save as" appears, i checked the response headers and it shows that the "Content-type" of the html page is "application/xhtml+xml; charset=utf-8", i did not set of these headers on the server side.
The problem is that this is not happening all the time, it comes and goes, and not on a specific page.
I am not using any ajax on the site, and also i tried to reinstall aspnet as per some other threads, i have also checked this thread regarding response headers, but i still get this problem.
Note: i am using an Image Controller with an ActionResult to return images from the DB as a File Like So
Function GetImage(ByVal id As Integer?) As ActionResult
Dim record = rep.GetArticlePhoto(id)
Return MyBase.File(record.ArticlePhotoContent.ToArray, "image/jpeg")
End Function