J
JeffW
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
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