Issue getting a .dll to load in iis 7

0

We have a .dll file that was written in 06, and according to .net reflector, it's not a .net assembly.

What this .dll does is allow for tests to be run from the browser, either remotely or on the server against IIS. When our customer had his server on Windows 2003, he had no issues. Since moving to 2008, he's not been able to get this functionality to work correctly.

I've been tasked with figuring out why.

The area tat calls this .dll is thus:

Spy.prototype.SendCommand = function( command )
    {
    var xmlDoc = null;

    var url = this.urlBase + command;

    if( "" != this.commandCode )
        {
        url += "&code=" + this.commandCode;
        }

    try
        {
        xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
        xmlDoc.async = false;
        var rc = xmlDoc.load( url );

        if( 4 == xmlDoc.readyState )
            {
            var err = xmlDoc.parseError;
            if (err.errorCode != 0)
                {
                LogError( "parsing error: " + err.reason );
                xmlDoc = null;
                }
            }
        else
            {
            LogError( "unable to load: " + url );
            xmlDoc = null;
            }
        }
    catch( e )
        {
        LogError( e.description );
        xmlDoc = null;
        }

    return xmlDoc;
    }

and thus:

Spy.prototype.AcquireControl = function( useForceIfNecessary )
{
var success = false;
var xmlDoc = this.SendCommand( "acquire" );
var state = this.ProcessState( xmlDoc );
if( null != state )
    {
    success = ( "" != this.commandCode );
    if( !success && useForceIfNecessary )
        {
        // Unable to acquire control so applying force.

        xmlDoc = this.SendCommand( "acquire/force" );
        state = this.ProcessState( xmlDoc );
        if( null != state )
            {
            success = ( "" != this.commandCode );
            if( !success )
                {
                LogError( "unable to acquire control of spy" );
                }
            }
        else
            {
            LogError( "No response from spy (with force)." );
            }
        }
    }
else
    {
    LogError( "No response from spy (without force)." );
    }

return success;
}

What's returned is a parsing error from xmldocument.

The URL being passed is the root folder, with the name of the dll in it, as well as the command 'acquire' which is an internal command to the .dll near as I can tell.

Has anyone run into odd issues such as this? I've looked at security settings, and made sure I had script/execute allow. I do have compatibility with iis 6.0 installed.

Could this be simply calling a very old dll on an updated server? If so, how would I get around/fix this?

I don't have access to the source code on our dll. I was able to decompile it with hopper, and that's what led me to understand the command being passed 'acquire', 'acquire/force' were internal to the .dll.

When I try to go to this .dll directly from the browser instead of going through code, I receive this error:

HTTP Error 500.0

With these details:

Module IsapiModule Notification ExecuteRequestHandler Handler ISAPI-dll Error Code 0x8007007f Requested URL /mymachine:80/ourwebap/ourdll.dll/acquire Physical Path C:\Program Files (x86)\our folder\ourwebappp\www\ourdll.dll\acquire Logon Method Negotiate Logon User **

I receive the same error if I remove the \acquire switch from the entered url request.

Any ideas?

iis-7
asked on Stack Overflow Dec 12, 2013 by smedley89

1 Answer

0

Apparently, the issue is with the dll itself.

According to this article: http://bytes.com/topic/net/answers/281186-isapi-dll-net-clr

IIS needs a dll to have these exports:

GetExtensionVersion HttpExtensionProc TerminateExtension

Our DLL does not have these exports. The only ones it as are GetFilterVersion HttpFilterProc

So, this dll and issue will not be able to run in IIS7. When being run on 6, after looking through the support history, the site had to be run in 5.0 mode. Looks like this one has been building for a while now!

answered on Stack Overflow Dec 13, 2013 by smedley89

User contributions licensed under CC BY-SA 3.0