[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

ASP.Net, Access to the path is denied from remote, works from local

I am trying to find out why an ASP.net program works when accessed from the same machine that has the web server, but fails when accessed from another machine in the local network.

I have an ASP.net program that puts a list of files into a list box. The files are in a network directory that resides on a 3rd machine, accessed via \\mach3\myDir\... I logon into machine A (where the web browser resides) and bring up the web page. All of the files are in the list box. I logon to machine B and bring up the web page, I get an error (see above). What is IIS doing differently to tasks that originate from the local machine and tasks that originate from another machine? Some other info:

- The security type is integrated windows, no annomyous user
- In the web.config file, I put the line <identity impersonate="true" />
- the windows user (MikeB) has full authority to the folder containing the files I am trying to access
- On the network share, I granted Network Service full authority to the folder containing the files I am trying to access

Thank you.
0
MikeBroderick
Asked:
MikeBroderick
  • 4
  • 3
3 Solutions
 
David H.H.LeeCommented:
Hi MikeBroderick,
>>.. I logon to machine B and bring up the web page, I get an error (see above)
Can you post the detailed errors here? One thing, try grant IIS permission to anonymous user. This seem like permission setting issue.
0
 
MikeBroderickAuthor Commented:
The message I get is:

Access to the path '\\Dcstorage\Shared\BroderickData\AEYTDPerf\NetPosData' is denied.  

On the grant IIS permission, I dont understand. Do you want to allow anonymous users?
0
 
David H.H.LeeCommented:
Hi MikeBroderick,
Ok, ignore my previous suggested first. Can i know what is the remaining permissions right instead of Network Service full authority used in network share for each machine ? Please mention the OS that using there for further clarification regarding your current solution environment.

0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
MikeBroderickAuthor Commented:
All 3 computers are Windows 2003 Small Business Servers with the latest updates applied. I am not sure what you are asking about permissions. Do you want me to look at the security tab in properties for the folder? If so, we gave the share everyone full rights (for testing). We also gave user MikeB (the windows user) and Network Service full rights.
0
 
David H.H.LeeCommented:
Hi MikeBroderick,
Yes, i'm referring security tab. Can you access the path after grant full permission for testing purpose? Lastly, can you print screen your IIS permission setting that used?

0
 
MikeBroderickAuthor Commented:
No, full permission still doesnt work. I have tried all combinations of impersonate, full user access to the network share, etc. No luck.

Attached is the IIS permissions that you asked for. It is Windows Authentication, no Anonomous.

t1.JPG
0
 
MikeBroderickAuthor Commented:
I made a mistake. I assumed if you dont have an impersonate statement in your app's web.config, it will be off. On my customer's machine, someone put a web.config file in the root dir that has an impersonate true statement. When I realized this I set impersonate to false and walla, it worked. Why Network Service can access the Remote Share and my ID cannot, I do not know, but this works fine.

Thank you for your help. Sorry for the mistake.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now