FileStream errors attempting to open file on Shared Drive

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Researched this, but none of the proposed solutions are working for me.
Am hoping for some insight.

Am trying to open a binary file that exists on a shared drive for
reading. Code lives inside a .NET web app and looks like this:

FileStream fs = new FileStream(_documentInfo.DocFile, FileMode.Open,
FileAccess.Read);

This statement generates error:

Could not find a part of the path "T:\TN001068\TN001068_Jun2005.PDF"

Details: System.IO.DirectoryNotFoundException

Based on my research, I understand it's a permissions problem. Since
this is a .NET app, the shared drive must be set up to allow access by
the ASP.NET "user". I access the shared drive's properties and under
security, add "ASPNET" user with permission to read and list folder
contents. Same error.

Other research showed me how to use WindowsIdentity.GetCurrent() inside
the app to see what user is in effect when running the app. It tells
me "NT_AUTHORITY/NETWORK SERVICE". I go the shared drive's properties
and set the same permissions for user "NETWORK SERVICE". Same error.

Is there something in IIS that needs to be set?

Any assistance would be eternally appreciated.

Jeff

.



Relevant Pages

  • Re: SQL 2000 Windows Authentication - Same User Multiple Groups
    ... functionality using our WinForm app and read-only functionality using ... SQL Server permissions are not application-aware. ... App1 contains CRUD functionality using stored procs (EXEC perms on ...
    (microsoft.public.sqlserver.security)
  • Re: Copying Files from Network to Local
    ... working using Code Access Security, ... website has less trust associated with it, and less permissions assigned ... However, when the app resides on a network drive, copying ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ASP App Hangs. ALL FIXED!
    ... It seems that when you disable Script Blocking in NAV (actually SYM ... > Up until the other day, the app worked without problems. ... > volume and has the correct permissions assigned and have not ...
    (microsoft.public.inetserver.asp.general)
  • Re: HELP please - I think this is a permissions problem - ASP.Net application
    ... Have you checked the permissions for the file itself? ... Ur I.T. Mate Group ... > Trying to run this app. ... > - Windows Media Services Guest Account ...
    (microsoft.public.inetserver.iis)
  • Re: Copying Files from Network to Local
    ... The rights that you have ... website has less trust associated with it, and less permissions assigned to ... However, when the app resides on a network drive, copying ...
    (microsoft.public.dotnet.languages.csharp)