I have ASP.NET MVC controller named dictionary with method ControlsLangJsFile. Method returns view of users control (ASCX) which contain JavaScript variables.
When
Like this, just change the content type accordingly:
ASP.NET MVC and text/xml content type