P
Peter O'Reilly
I am experiencing difficulty access a mapped network drive in an ASP.NET
application.
While using the .Net framework v 1.1 implementation of
System.IO.Directory.Exists(), it fails to recognize a mapped network drive.
This is true if the path specified uses a mapped drive letter or is
expressed as a UNC address. I have also tried the drive letter and UNC
paths with and without trailing backslashes, respectively.
No luck with ASP.NET, but it does work when I create a simple C# console
test harness application. This indicates to me to be a security concern with
ASP.NET. Funny thing is - no exception is returned. For all combinations,
System.IO.Directory.Exists returns false. (If so, this behavior is very
inconsistent with the System.Security thrown for things like trying to write
to a file, execute code on another machine, etc.)
The following knowledge base article:
307901: INFO: Permissions to Connect to a Remote Access Database from
ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;307901&Product=aspnet
recommends using impersonation, but an error occurs even before the 1st line
of my ASP.NET code is executed.
No windows event is logged either.
How do I get the ASP.NET worker process to recognize another machine's hard
drive, folders and files?
Any help is appreciated. Thanks!
application.
While using the .Net framework v 1.1 implementation of
System.IO.Directory.Exists(), it fails to recognize a mapped network drive.
This is true if the path specified uses a mapped drive letter or is
expressed as a UNC address. I have also tried the drive letter and UNC
paths with and without trailing backslashes, respectively.
No luck with ASP.NET, but it does work when I create a simple C# console
test harness application. This indicates to me to be a security concern with
ASP.NET. Funny thing is - no exception is returned. For all combinations,
System.IO.Directory.Exists returns false. (If so, this behavior is very
inconsistent with the System.Security thrown for things like trying to write
to a file, execute code on another machine, etc.)
The following knowledge base article:
307901: INFO: Permissions to Connect to a Remote Access Database from
ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;307901&Product=aspnet
recommends using impersonation, but an error occurs even before the 1st line
of my ASP.NET code is executed.
No windows event is logged either.
How do I get the ASP.NET worker process to recognize another machine's hard
drive, folders and files?
Any help is appreciated. Thanks!