1

I am working on an ASP.Net MVC application that requires to read some xml files and transform it to HTML before sending it to the client browser.

I was wondering if anybody could suggest what is the best option to send the processed stream back to the Client Browser. Is it 1> using Asp.Net MVC's FileStreamResult result Type or 2> using an HTTPHandler for IIS 7.5 with Integrated Mode.

Also which option would be a more optimized solution along with performance?

XpertSiji
  • 811
  • 1
  • 6
  • 8
  • you can use this http://stackoverflow.com/questions/5826649/returning-a-file-to-view-download-in-mvc – Sergey Jul 14 '14 at 20:05
  • The big performance difference is going to be determined by how you transform the xml to html (xslt, in memory data sets, etc), not the method you use to return the data . Creating an HTTPHandler would probably be overkill here. – Jason Nesbitt Jul 14 '14 at 20:13

1 Answers1

0

Performance-wise, an IHttpHandler implementation works faster than an MVC controller's method, since does not involve the complexity of the MVC stack.

Herman Kan
  • 2,253
  • 1
  • 25
  • 32