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

  • Home
  • SEARCH
  • 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 7189139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:14:16+00:00 2026-05-28T19:14:16+00:00

I am trying to create a quick fix for a problem I am having.

  • 0

I am trying to create a quick fix for a problem I am having. All I need to do is download a file from my website to a local computer.

I have a website using ASP.NET and C# and I have added the code below to a button click to download a file:

WebClient webClient = new WebClient();
webClient.DownloadFile(“http://www.mysite.com/myfile.ext”, @”C:\test\myfile.ext”);

which produces the error in the title:

Could not find a part of the path ‘C:\test\myfile.ext’.

The directory does exist on my computer.

From what I have read this appears to be a permissions issue on the local computer. I have added full permissions on that directory for the NETWORK SERVICE user as I am running Windows 7. I also have a user that is running XP so I believe the user there would be ASPNET.

Needless to say none of this has worked and allowed me to download the file. I’m a little out of my element here so I’m not sure what to do. It could be that I’m on the right track and just missed something obvious, or maybe I’m way off base.

Anyone have some guidance for me?

EDIT

The more I think about this, I can’t help but think there’s a better way to do this.

I’ve downloaded from websites before without ever needing to deal with permissions, so what would be a better simple approach? What am I missing here?

ANSWER

Thanks, I found exactly what I needed from Hari’s responses below.

  • 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. Editorial Team
    Editorial Team
    2026-05-28T19:14:17+00:00Added an answer on May 28, 2026 at 7:14 pm

    The user running the application pool used by your website needs to be given permissions to read that file. So, goto IIS > app pools > find the one for your website > the one that’s under identity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a quick hashcode function for a complex number class
I am trying to use the googlecharts gem to create some quick charts. Here
Hello all i have a button i am trying to let users share a
I was trying to create a quick little script that would insert data into
I'm trying to create a quick piece of code to capture the key sequence
I`m trying to create simple QML application. I have QtSDK installed with latest QtCreator.
I'm trying to create a xml file for Flam3 that contains multiple forms. I'm
I have the following data and am trying to create a barplot in R
I have a controller which renders a view (~/Views/Component/Create.aspx) no problem. When this view
I'm trying to create a quick ASP.NET MVC 3 application using the RC version

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.