title: Recommended way to create an ActionResult with a file extension
body: <p>I need to create an ActionResult in an ASP.NET MVC application which has a .csv filetype.</p>
  
  <p>I will provide a 'do not call' email list to my marketing partners and i want it to have a .csv extension in the filetype. Then it'll automatically open in Excel.</p>
  
  <pre><code> http://www.example.com/mailinglist/donotemaillist.csv?password=12334
  </code></pre>
  
  <p>I have successfully done this as follows, but I want to make sure this is the absolute best and recommended way of doing this.</p>
  
  <pre><code>    [ActionName("DoNotEmailList.csv")]
      public ContentResult DoNotEmailList(string username, string password)
      {
              return new ContentResult()
              {
                  Content = Emails.Aggregate((a,b)=&gt;a+Environment.NewLine + b), 
                  ContentType = "text/csv"
              };
      }
  </code></pre>
  
  <p>This Actionmethod will respond to the above link just fine.</p>
  
  <p>I'm just wondering if there is any likelihood of any unexpected conflict of having the file extension like this with any different version of IIS, any kind of ISAPI filter, or anything else I cant think of now.</p>
  
  <p>I need to be 100% sure because I will be providing this to external partners and don't want to have to change my mind later. I really cant see any issues, but maybe theres something obscure - or another more "MVC" like way of doing this.</p>