0
votes

ActiveX dll not working on IIS 8.5

We have a classic ASP application that uses and ActiveX dll to generate an image on the fly. It was working find on Window 2003 with IIS6. But we're migrating it to Windows 2012 and IIS 8.5. The DLL is registered on the server, configured to run under it's own app pool (No Managed Code, Classic pipeline mode). It's virtual directory is configured to run as an application and has a handler mapping for *.dll to point to the DLL for all verbs with Execute Access rights, which is the same config for IIS6.

The ASP code to render the HTML calling DLL looks like this:

<%dim SpokeData
dim JobName
dim NumOfExperts
dim ThisDirNo
dim ThisSel
dim PAPIType
dim JobType
dim SpokeDataShort
SpokeData = trim(Request.QueryString("Data"))
JobName = trim(Request.QueryString("JobName"))
NumOfExperts = trim(Request.QueryString("Exp"))
PAPIType = trim(Request.QueryString("PAPIType"))
JobType = trim(Request.QueryString("JobType"))
CalcDate = trim(Request.QueryString("Date"))
For ScaleNo = 1 to 20
    ThisSel = Mid(SpokeData,(ScaleNo*2),1)
    ThisDirNo = Mid(SpokeData,(ScaleNo*2)-1,1)
    If ThisSel = "1" then SpokeDataShort = SpokeDataShort & ThisDirNo else SpokeDataShort = SpokeDataShort & "0"

Next
Response.Write("<div id='Wheel'><img style='margin-left:20px' src='http://www.example.com/jpwheel/jpwheel.dll?Handler=Render&nori=" & PAPIType & "&dir=" & SpokeDataShort & "&" & Now & "'></div>")
%>

The HTML then lookslike this: <img src="http://www.example.com/jpwheel/jpwheel.dll?Handler=Render&amp;nori=N&amp;dir=55555050555000000000&amp;11/05/2015 16:05:24" style="margin-left:20px"> if I try to download this directly I get a 500 error (no error log unfortunately).

It is working on IIS6, not working on IIS8.5. Can anyone cast some light on migrating ActiveX server-side DLLs to IIS8.5? One thing I haven't done is check the dependencies for the DLL, can anybody recommend a tool for that? I'm guessing with windows 2003 coming to end of life a number of people are running into issues like this.

1
Switch on Failed Request Tracing? Does the DLL have an interface you can manually call from a .VBS to test?Alex K.
Most probably your App pool is running in 64bit mode and DLL is 32 bit. Try setting "Enable 32bit Application" to true on advanced settings options of App pool.Pankaj Kapare
Don't know about the interface as I don't have the source code or any documentation (application is 12 years old), and I don't failed request tracing isn't installed.Phil
App pool is running as a 32bit application already.Phil
What line of code was used to register it on the server?WorkSmarter

1 Answers

2
votes

The problem was caused by using the incorrect handler mapping. I had it setup as a Script Map. It needed to be a Module Mapping with the following details:

  • Request path: *.dll
  • Executable: Path to the jpwheel.dll
  • Module: IsapiModule
  • Name: jpwheel

Request Restrictions: All Verbs, Access required: Script

Feature Permissions: Read, Script, Execute

So it's working now.