Download text file without extension issue RRS feed

  • Question

  • User-2031171425 posted


    I need to download file that does not have extension. The file itself is a simple plain text file. I do this from code using WebClient object. I also cannot view this file in browser with the same error.The error was 404 - file not found.

    After research I added mime type:    .*    as    application/octet-stream on web server level. Also the file has these permissions:

    NetworkService - full access, ASP.NET - full access. Rebooted machine after making changes.

    Still the same issue.

    Anybody can advise what else to look for?

    Thanks a lot,


    Tuesday, June 19, 2012 1:57 PM

All replies

  • User-287491473 posted

    I think the right thing to do would be to work with the file provider to have an extension added to the file.  If you cannot access the file from your browser, it will be difficult or impossible to get it working through a WebClient.  I did a quick search and it looks like this is a common issue without any real simple answers.  The right fix seems to be having an extension added to the file.

    Tuesday, June 19, 2012 4:38 PM
  • User-2031171425 posted

    Unfortunately we do not have control over these plan text files that will total in size for about 15 GB. What is puzzling me is that I was able to download files withou extension on one staging server with adding  mime type .* as  application/octet-stream . Then we built another paralel staging server for development  where download fails. I check all settings I know on both servers and they are identical. I am guessing I am still missing some specific setting on this new development server.


    Wednesday, June 20, 2012 12:25 AM