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 8962451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:07:41+00:00 2026-06-15T16:07:41+00:00

tl;dr: critical bits are in bold. We have a website page that, when executed,

  • 0

tl;dr: critical bits are in bold.

We have a website page that, when executed, is supposed to read in a series of files, zip them up, and return them to the user.

Unfortunately, we are running into an error:

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request
identity. ASP.NET has a base process identity (typically
{MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if
the application is not impersonating. If the application is
impersonating via , the identity will be
the anonymous user (typically IUSR_MACHINENAME) or the authenticated
request user.

My line attempting to access the file currently looks like this:

using (FileStream x = File.Open(@"\\thedirectory\filename.pdf", FileMode.Open, FileAccess.Read)) { }

(This line doesn’t do anything useful other than try to open the file, since right now I’m just trying to see if I have access at all.)

This code works, and opens the file without a problem if I copy the file to a directory on my machine and have the path go there. But if I go to the remote machine where the original file is, no dice.

I went down a rabbit hole for a while trying to make sure that whoever the ASP.NET process was running as, that process had permissions to the directory. However, since that wasn’t working and I was getting desperate, I have given “everyone” all access rights to the remote directory as a test. Still getting the same error.

I’m guessing this is a permissions issue (since that’s what it’s claiming) combined with the fact that the code works when pointing at a local file. However, since I’ve already given “everyone” all permissions, I’m lost as to what could be going wrong.

Ideas?

  • 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-06-15T16:07:42+00:00Added an answer on June 15, 2026 at 4:07 pm

    I’m guessing that the other files are on a different machine, here is one possiblity: https://serverfault.com/questions/41130/network-service-account-accessing-a-folder-share

    Another possiblity is to impersonate a domain account that has access to the target folder- http://support.microsoft.com/kb/306158

    Or change the service account to a domain account that has access to the target folder.

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

Sidebar

Related Questions

I am facing a critical problem. I have a page that has two parts.
I have certain critical bash scripts that are invoked by code I don't control,
I am already using unit testing to ensure that all critical bits and pieces
I have a critical section which is to be executed only once but is
I have a time critical application that needs to send a UDP datagram on
I have some critical branching code inside a loop that's run about 2^26 times.
Memory usage is quite critical in my application. Therefore I have specific asserts that
It seems that using Critical Sections quite a bit in Vista/Windows Server 2008 leads
I have a speed critical multithreaded program which involves data in a tree structure.
This is a time critical bug otherwise I wouldn't have posted here and it's

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.