Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 174845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:35:42+00:00 2026-05-11T13:35:42+00:00

We have a CMS I created and it’s working great but now I want

  • 0

We have a CMS I created and it’s working great but now I want to move the download of the mobile binary (installer) files to the CMS. They are currently streamed from another server.

The only solution I can see is to have an index of what files are in what folders etc as an Xml document and use Linq2Xml for retrieving the files and streaming them to the mobile browser. I really don’t want to use a database for this. I was thinking of upgrading the download portals to MVC because of the built in capabilities to stream a file directly to a browser by specifying byte[], filename and mime.

Any better suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T13:35:43+00:00Added an answer on May 11, 2026 at 1:35 pm

    Very simple to provide files directly from an MVC controller. Here’s one I prepared earlier, as it were:

    [RequiresAuthentication] public ActionResult Download(int clientAreaId, string fileName) {     CheckRequiredFolderPermissions(clientAreaId);      // Get the folder details for the client area     var db = new DbDataContext();     var clientArea = db.ClientAreas.FirstOrDefault(c => c.ID == clientAreaId);      string decodedFileName = Server.UrlDecode(fileName);     string virtualPath = '~/' + ConfigurationManager.AppSettings['UploadsDirectory'] + '/' + clientArea.Folder + '/' + decodedFileName;      return new DownloadResult { VirtualPath = virtualPath, FileDownloadName = decodedFileName }; } 

    You might need to do a bit more work actually deciding what file to deliver (or, more likely, do something completely different), but I’ve just cut it down to the basics as an example that shows the interesting return bit.

    DownloadResult is a customised ActionResult:

    public class DownloadResult : ActionResult {     public DownloadResult()     {     }      public DownloadResult(string virtualPath)     {         VirtualPath = virtualPath;     }      public string VirtualPath { get; set; }      public string FileDownloadName { get; set; }      public override void ExecuteResult(ControllerContext context)     {         if (!String.IsNullOrEmpty(FileDownloadName))         {             context.HttpContext.Response.AddHeader('Content-type',                                                    'application/force-download');             context.HttpContext.Response.AddHeader('Content-disposition',                                                    'attachment; filename=\'' + FileDownloadName + '\'');         }          string filePath = context.HttpContext.Server.MapPath(VirtualPath);         context.HttpContext.Response.TransmitFile(filePath);     } } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a basic CMS using CodeIgniter 2.0.3, and now I want to
I have created a small scale CMS for a website I am working on
I have created a website in PHP, now I want to add ad support
I have an existing CMS svn repository CMS_REPO. Now I want to use this
I have created CMS pages in Magento and I want to share with Social
I have a site setup and working well based in Silverstripe cms. I created
I have created a website using vbulletin i have installed CMS and BLOG modules
I have created a reddot cms component, in which I added this line Also,
We have a CMS which has several thousand text/html files in it. It turns
I have a cms engine that I created not long back, I have used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.