Can anyone expalin to me how to let ASP code access files located on a mapped drive (this mapped drive points to a share folder on another computer) on IIS 6.0 (Windows Server 2003)

Thanks

Re: Problem with IIS 6.0 by Ken

Ken
Sat Jun 05 03:46:41 CDT 2004

a) Do not use mapped drive letters - use UNC paths
b) The user account that IIS is impersonating needs to have rights to the
remote share (eg the default anonymous user account: IUSR_<machine> is local
to the webserver and can't be assigned rights to the remote machine)
c) If you are requiring the user to authenticate, you will need to:
- use Basic Auth + SSL
and/or
- Kerberos + Delegation
and/or
- if you are using Windows 2003 domain, then you can use protocol
transition
Otherwise, the token that IIS has doesn't have permission to logon to remote
resources

Cheers
Ken

"Walid" <anonymous@discussions.microsoft.com> wrote in message
news:9B136978-B73F-4CE2-8E4E-2803B9C30439@microsoft.com...
: Can anyone expalin to me how to let ASP code access files located on a
mapped drive (this mapped drive points to a share folder on another
computer) on IIS 6.0 (Windows Server 2003).
:
: Thanks



Re: Problem with IIS 6.0 by anonymous

anonymous
Sat Jun 05 05:51:03 CDT 2004

Please see the following code
'''''''''''''''''''''''''''
set oFoxConn = server.CreateObject ("ADODB.Connection"
oFoxConn.Open ("DSN=aaa"
Response.Write oFoxConn.State & "<hr>
set oFoxRs = server.CreateObject ("ADODB.recordset"
oFoxRs.Open "select * from ORDHDR",oFoxCon
Response.Write oFoxRs.RecordCount & "<hr>
oFoxRs.Clone
oFoxConn.Close
set oFoxConn = nothin
'''''''''''''''''''''''''
in the line : oFoxRs.Open "select * from ORDHDR",oFoxCon
I get the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'

[Microsoft][ODBC Visual FoxPro Driver]File 'ordhdr.dbf' does not exist.

/asp2fox/conn.asp, line 5

1. The DSN is points to Map drive I got the above error
2. The DSN is points to UNC path I got the above error
3. The DSN is points to local drive works fine.

Re: Problem with IIS 6.0 by Ken

Ken
Sat Jun 05 07:43:44 CDT 2004

Hi,

Please reread my previous post. If you do not understand something, please
ask.

Alternatively, goto my site: www.adopenstatic.com On the homepage there is a
link to download a sample chapter from my IIS 6.0 security book. It explains
impersonation and authentication if you need more indepth information (I am
not going to post it all here - there's about 25 pages worth of stuff).

Cheers
Ken

"Walid" <anonymous@discussions.microsoft.com> wrote in message
news:B52F3781-56EC-446F-9E73-994C579F7EB4@microsoft.com...
: Please see the following code:
: ''''''''''''''''''''''''''''
: set oFoxConn = server.CreateObject ("ADODB.Connection")
: oFoxConn.Open ("DSN=aaa")
: Response.Write oFoxConn.State & "<hr>"
: set oFoxRs = server.CreateObject ("ADODB.recordset")
: oFoxRs.Open "select * from ORDHDR",oFoxConn
: Response.Write oFoxRs.RecordCount & "<hr>"
: oFoxRs.Clone
: oFoxConn.Close
: set oFoxConn = nothing
: ''''''''''''''''''''''''''
: in the line : oFoxRs.Open "select * from ORDHDR",oFoxConn
: I get the following error:
: Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
:
: [Microsoft][ODBC Visual FoxPro Driver]File 'ordhdr.dbf' does not exist.
:
: /asp2fox/conn.asp, line 5
:
: 1. The DSN is points to Map drive I got the above error.
: 2. The DSN is points to UNC path I got the above error.
: 3. The DSN is points to local drive works fine.



Re: Problem with IIS 6.0 by anonymous

anonymous
Sat Jun 05 08:11:03 CDT 2004

Sorry
But I did what you said nothing work also, I cahnged the IIS Account for this virtual directory (Security) to the Administrator user of the remote machine, the same error ...
Note: I can't add permission for the IUSR_WEBSERVER user on the remote machine.

Re: Problem with IIS 6.0 by jcochran

jcochran
Sat Jun 05 11:20:55 CDT 2004

On Sat, 5 Jun 2004 06:11:03 -0700, "Walid"
<anonymous@discussions.microsoft.com> wrote:

>Sorry,
>But I did what you said nothing work also, I cahnged the IIS Account for this virtual directory (Security) to the Administrator user of the remote machine, the same error ....
>Note: I can't add permission for the IUSR_WEBSERVER user on the remote machine.

Of course you can't. As Ken said, the IIS Anonymous account is a
*local* account. It doesn't exist on the remote machine. You need to
use a domain account, or provide an account on the remote machine that
has access.

Jeff