Groups | Blog | Home
all groups > iis security > june 2008 >

iis security : _stat from ISAPI Extension always returns FILE_NOT_FOUND


Jason Viers
6/19/2008 11:27:03 AM
I have an IIS 6 ISAPI Extension that is set as a Wildcard Application
Map. The virtual directory is set to Inegrated Authentication
only so it impersonates the requesting user (which GetUserNameEx
confirms).

The IIS machine is trusted for delegation, and the extension uses
WinHttp to access various protected HTTP resources, and uses _stat &
ReadFile to access files shared by other machines
(\\server\share\other\dir\file.txt). This all works fine our testing
environment.

In the customer's environment, accessing HTTP resources works fine,
however all _stat calls fail with an errno of 2
(ERROR_FILE_NOT_FOUND). I've torn this all the way down to an ISAPI
Extension that does nothing but echo its user and _stat the query string
it's given, and it's always file not found.

----------------------------------------
A normal EXE run by the user on the IIS machine *IS* able to _stat
(and read) the same remote resource successfully, so I doubt it's a
firewall issue. Due to the fact that protected HTTP requests work, I
also doubt a delegation issue.

I'm suspecting there's some kind of policy set in either the domain or
the IIS machine itself that is preventing IIS from accessing the
resource when impersonating the user, but I'm not familiar enough with
policies to guess what it might be. Attempts to duplicate this
behavior on our testing network haven't been successful.

David Wang
6/19/2008 11:50:03 PM
[quoted text, click to view]



What is the filepath (representative).
What is the bitness (32bit/64bit) of the ISAPI Extension and the OS.
Is the filepath a Junction or Mounted partition.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
AddThis Social Bookmark Button