D
DMG
I have <identity impersonate = "true" /> & <authentication
mode="Windows"/> in the web.config. This is a 2.0 site. My Goal: I
want to simply have the user browse to a file on a mapped drive and get
the UNC for that file and eventually save that unc path to the database
as a link. The problem is depending on office we have the same drive
letter mapped to different servers.
My current test works when I run everything locally and maps correctly
to even a network drive. It fails when I deploy to a production server
with the following error.
Error:
System.Web.HttpUnhandledException: Exception of type
'System.Web.HttpUnhandledException' was thrown. --->
System.Runtime.InteropServices.COMException (0x800A0044): Exception
from HRESULT: 0x800A0044 (CTL_E_DEVICEUNAVAILABLE)
at Scripting.FileSystemObjectClass.GetDrive(String DriveSpec)
asp.net 2.0 c# Code:
string sTemp = filepath.Value.ToString(); // mapped drive/file
input string
Scripting.FileSystemObject FSO = new
Scripting.FileSystemObject();
Scripting.Drive Drive = FSO.GetDrive(sTemp.Substring(0, 2));
<== error line
...
I have tried to impersonate an account (using advapi32.dll LogonUser())
that has heightened authority but that fails as well - I can provide
details . Perhaps I am just missing the right setting on that account.
Thanks in advance for any help.
mode="Windows"/> in the web.config. This is a 2.0 site. My Goal: I
want to simply have the user browse to a file on a mapped drive and get
the UNC for that file and eventually save that unc path to the database
as a link. The problem is depending on office we have the same drive
letter mapped to different servers.
My current test works when I run everything locally and maps correctly
to even a network drive. It fails when I deploy to a production server
with the following error.
Error:
System.Web.HttpUnhandledException: Exception of type
'System.Web.HttpUnhandledException' was thrown. --->
System.Runtime.InteropServices.COMException (0x800A0044): Exception
from HRESULT: 0x800A0044 (CTL_E_DEVICEUNAVAILABLE)
at Scripting.FileSystemObjectClass.GetDrive(String DriveSpec)
asp.net 2.0 c# Code:
string sTemp = filepath.Value.ToString(); // mapped drive/file
input string
Scripting.FileSystemObject FSO = new
Scripting.FileSystemObject();
Scripting.Drive Drive = FSO.GetDrive(sTemp.Substring(0, 2));
<== error line
...
I have tried to impersonate an account (using advapi32.dll LogonUser())
that has heightened authority but that fails as well - I can provide
details . Perhaps I am just missing the right setting on that account.
Thanks in advance for any help.