How do I set a file to download instead of execute?

Posted on 2009-12-31
Last Modified: 2012-05-08
I have a .pcf file that I need the end user to be able to download, but the server tries to execute it resulting in page cannot be displayed. Would I setup a Mime type in IIS?
Question by:jsmithswi
    LVL 35

    Accepted Solution

    Yes. Add a MIME type as described here:;en-us;326965

    Then restart IIS.
    LVL 57

    Assisted Solution

    by:Pete Long
    Hello jsmithswi,

    put the VPN config file in a zip folder? - though to be honest I wouldnt distribute this way!! a pcf file is easy to reverse engneer to get the VPN shared secret see for yourself

    Password protect the ZIP file!!!



    Author Comment

    I tried that and it displays the file content, but how would I make it execute the prompt to save or open the file? Thanks.

    Author Comment

    That's pretty scary. I was trying to automate everything, but it looks like a little extra effort really makes up for it in security. The actual file names are 64 characters long, but I'm sure there are methods of getting past the directory listing denied to get the file names. Protected zip sounds like the best solution in this case.
    Thanks a lot.
    LVL 57

    Expert Comment

    by:Pete Long

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) ( is a much better solution when you need to p…
    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now