ISAPI dll and .NET (clr)

  • Thread starter David Sacks via .NET 247
  • Start date
D

David Sacks via .NET 247

Hi,

Was wondering if anyone knows how to get an ISAPI dll to workwith managed .NET code? I have an exisiting ISAPI dll and I'dlike to get it working with some .NET managed code. I've enabledthe /clr option, integrated my managed code into the unmanagedcode and have my dll compiling and linking. Initialially I gotthe following error: LNK4243 'DLL containing objects compiledwith /clr is not linked with /NOENTRY; image may not runcorrectly'.

I found Microsofts KBA 814472 and followed its instructions. Nowit links without any errors. However, when I go to access thedll through IIS, I get a 500 error with the following win32error - 127 (The specified procedure could not be found.). I'vetried to debug into the dll, however it appears to never getcalled (loaded). My guess is, the correct ISAPI dll entry pointmay not exist anymore since following all the instruction in814472.

Any ideas or help would be greatly appreciated.
 
W

William DePalo [MVP VC++]

David Sacks via .NET 247 said:
Now it links without any errors. However, when
I go to access the dll through IIS, I get a 500
error with the following win32 error - 127
(The specified procedure could not be found.).

That's right. IIS wants to see a DLL with these exports:

GetExtensionVersion
HttpExtensionProc
TerminateExtension

The first is used to negotiate a version of ISAPI with IIS. The second is
where you implement the guts of your application. The third is a
notification that IIS is about to unload the extension.

At the command line enter

dumpbin /exports YourISAPIDLLNameGoesHere.dll

if the names above are decorated (aka mangled) then use a module definition
file to export them plain. If not present, add them.

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top