Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IIS 7.0 Is an e-Torture Device!

48 views
Skip to first unread message

Jeffrey Walton

unread,
Oct 5, 2009, 4:43:56 AM10/5/09
to
Vista Home Premium, SP2, Fully patched, x64 (IIS 7.0)
Visual Studio 2008
Windows 7.0 SDK
Native Extension Dll
======
Website: 'Test'
ISAPI Filters (Website): includes the extension Dll
Handler Mappings (Website): path: "download.dll", "File or Folder",
"All Verbs", IsapiModule, Execute
Virtual Directory: Name matches that in the form, inherits the handler
mapping
======
HTTP Error 500.0 - Internal Server Error
Calling GetProcAddress on ISAPI filter "C:\Users\Public\...\Release
\x64\download.dll" failed
Module IIS Web Core
Notification Unknown
Handler StaticFile
Error Code 0x8007007f
======
* dumpbin shows that GetExtensionVersion, HttpExtensionProc, and
TerminateExtension *are* exported
* GetExtensionVersion, HttpExtensionProc, and TerminateExtension each
return TRUE
* GetExtensionVersion, HttpExtensionProc, and TerminateExtension use
OutputDebugString
* Process Monitor shops that the extension DLL is resulting in
ERROR_SUCCESS
* DebugView shows that DllMain is being called (PROCESS_ATTACH and
PROCESS_DETACH)
* DebugView shows that GetExtensionVersion *is not* being called
* Event Log, IIS-W3SVC-WP: 'Could not load all ISAPI filters for site
'TEST'. Therefore site startup aborted.'
* IIS logging: what logging?...

Its *really* unfortunate that logging and reporting is *so* poor. For
example, which 'Procedure' could not be found? It would be a great
help.

It's *really* unfortunate that Vista Home does not include standard
tools such as the Local Security Policy editor so that I can check
that IUSR and IIS_IUSR have 'Bypass Traverse Checking'. It would also
be nice to increase failed access auditing on objects.

Any ideas would be greatly appreciated. And a book by David Wang (or
other IIS team members) would not hurt.

Thanks,
Jeffrey Walton

David Wang

unread,
Nov 8, 2009, 6:44:07 AM11/8/09
to


Compared with prior IIS versions, IIS7+ is remarkably well documented,
openly extensible, and rich in logging/tracing to troubleshoot errors.
Most of these features are not enabled by default for some combination
of "production-ready", performance, and security reasons.

Unfortunately, there is no one place where you can get all relevant
logging/tracing to troubleshoot IIS-related issues.

At this point, the failure 0x8007007f that you see is because your
native DLL is considered an ISAPI Extension, but you configured it as
an ISAPI Filter. The two are completely different technologies, and
the only thing in common between them is the word "ISAPI".

IIS considers failure to load any ISAPI Filter fatal. This is why the
website failed to start up. It is also what the event log message
says:

IIS-W3SVC-WP: 'Could not load all ISAPI filters for site 'TEST'.
Therefore site startup aborted.'

The main thing that I can think of to improve would be if the message
gave you some hints on what to do based on the Win32 error for common
cases. For example, 0x8007007f means "The specified procedure could
not be found.", which requires one to understand that IIS uses
different entrypoints to load ISAPI Filters, and that the ones for
ISAPI Extensions do not apply nor work for ISAPI Filters. This
understanding should then lead one to realize that loading an ISAPI
Extension DLL as an ISAPI Filter DLL would not work. But of course, if
one knew this, they would not misconfigure and get to the failure in
the first place.

Which ultimately means that the current error message is non-helpful
-- because if you knew the answer, you wouldn't ask the question; and
if you didn't know the answer, the message does not help understand
the problem. For example, for error 0x7f, the error message could say:


Could not load all ISAPI filters for site 'TEST'. Therefore site

startup is aborted.
Please ensure all configured global and site ISAPI filter DLLs
export the GetFilterVersion and HttpFilterProc function signatures.

That would probably help one realize either:
1. Their DLL is not an ISAPI Filter DLL
2. How to make their DLL into an ISAPI Filter DLL


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

0 new messages