Solved

isapi dll running on IIS6 gives "The specified module could not be found" error, why ?

Posted on 2011-02-28
10
1,564 Views
Last Modified: 2012-05-11
OK, I know, as soon as you see something like this when trying to run a isapi.dll in IIS you probably say ... it's not configured properly or permissions.
Well me too, but I'm horribly perplexed by this one ...
I have two different Delphi/IntraWeb isapi.dll in the SAME virtual directory. One works just fine, the other gives "The specified module could not be found". Each dll has the same properties in IIS and each has the same properties/permissions at file level in NTFS. Also ...

1. Both dlls require access to MySQL server, the workng one achieves this correctly, so I currently don't think it is a reference to any MySQL extension.

2. Being IIS6, I definitely have setup the errant isapi.dll (as well as the working one) as an allowed web extension and changed this as I've moved it between virtual directories during attempts to get it to work.

3. Just for testing, I have given all groups full control permissions at file level. Even that didn't help.

4. The non-working dll requires registry access (specifically coded as read only to HKEY_LOCAL_MACHINE ... I think this is allowed) to get some initial settings information. Perhaps this would cause the problem ? ... if so, what is required by way of permissions/configuration within IIS to allow the dll to read the registry ? However I have tried recompiling the dll with no requirement to read the registry and still have the same problem.

5. Looking at the associated IIS website logfile, I see that with the dll which runs OK I am getting sessions and what appear to be 200 OK responses but with the non-working dll I get 500 responses with no sessions started (if I'm interpreting the logfile correctly)

It seems that I need, for some reason, a different configuration for the non-working dll. I'm really stuck with this, what exactly is IIS6 trying to tell me ? ... I'm not the greatest with IIS, how could I find out which module it is referring to and fix this ?

thanks and best regards

RR
0
Comment
Question by:RetroRocker
  • 5
  • 4
10 Comments
 
LVL 15

Expert Comment

by:vahiid
Comment Utility
Try matching the 'Directory Security' settings on the non-working Virtual Folder with the working one:

In IIS, right click on the virtual folder -> Properties -> Directory Security. Look under Authentication and access control and see if the non-working has anything different than the working folder.
0
 

Author Comment

by:RetroRocker
Comment Utility
vahiid: thanks anyhow but as mentioned in my original post, I have both isapi dlls located in the SAME virtual folder.
I have tried different virtual folders in the past and have checked the properties you discuss in those cases ... the issue is always the same.
The implication seems that my non-working dll requires something different from the working one. From the programming view point I have no idea what this could be and the error is too cryptic to help. If there was some sort additional dependency you would think that there would be at least an attempt to load the dll then complain, rather than seemingly to just indicate that it can't find the dll to start with :-(
Any further ideas will be gratefully received.

thanks RR
0
 
LVL 27

Accepted Solution

by:
BigRat earned 500 total points
Comment Utility
"The specified module could not be found".

Usually comes from a call to the Windows API LoadLibrary and denotes that either this dll could not be found or one of the depemdant dlls cannot be found. Using a dll dependancy checked make sure that all referenced dlls are in the load path.
0
 

Author Comment

by:RetroRocker
Comment Utility
BigRat: right on track ... I probably should have given this more attention but I became besotted by rights/permissions ! (still am !) There was a dll dependency for the open source PCRE library which was absent from that server and has now been fixed. So thanks indeed BUT it does appear as though I do have something of a compound problem here because although I have lost the "specified module ..." error, I still can't run that isapi dll. Now I get "Authenication Required" with the browser displaying a Username/Password dialog ... for which I have no username or password. Now this must be a permissions issue but I still cannot fix it.
Bearing in mind I have another isapi dll in this SAME virtual directory which runs perfectly and both dlls have the SAME permissions both at file level in NTFS and in IIS properties ... I'm still stuck ! I appreciate that you have technically answered the question but I want to keep this open a bit longer to see if I can fully resolve it. If not, then I will close and re-ask with regard to the still troublesome part.
In the mean time any further ideas ...

thanks RR
0
 
LVL 27

Expert Comment

by:BigRat
Comment Utility
One can of course do an authentication, and therfore pull up the dialog box in IE, inside the ISAPI module (although I have never done this). Is the module written in Delphi and did you write it yourself?

Does the module access any files and if so are their permissions OK?
If there is a database involved, it might be that the module asks for credentials in order to open the database, so try any user/password combination for the database.

(I'm clutching at straws because the IIS permissions for ISAPI are all rather straightforward and can easily be checked - which I presume you have done.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:RetroRocker
Comment Utility
Yes it is written in Delphi by myself and it is an IntraWeb isapi application.
The current situation is that:
1. For the purpose of simply getting it to work, all groups have been given full control both at folder/file level in NTFS and for all available permissions within IIS Manager.
2. Being IIS6, a specific entry has been included in Web Extensions and allowed.
3. I have moved the app. to various virtual directories in different websites and their subdomains.

I always get a username/password dialog. I am using Firefox 3.6.13 as my defualt browser (not that it makes any difference of course) and the dialog requests username / password for whatever domain I'm using but I have no response for this and it is not a request made for accessing any web page or web application in any other (sub)domain normally.

The indications are towards an issue with the actuall isapi dll. I have tried your suggestion of using the database access username / password but nothing works at all. I just cannot get past this dialog.
Probably I will have to tear this code apart and systematically implement any features of the application one by one but this is truly strange !!!

Any more ideas, anytime, please feel free because I currently cannot think of anymore. It will turn out to be really simple ... you bet :)

thanks RR
0
 
LVL 27

Expert Comment

by:BigRat
Comment Utility
Since you have TWO modules, have you tried taking the cone that works out and just testing if the other functions? Dangerous I know, because when you put it back together again it probably won't work at all!

0
 

Author Comment

by:RetroRocker
Comment Utility
BigRat: the working module in this case was simply an advanced test of some of the features of the non-working module. Both are currently in the same virtual/physical directory but have been moved to other locations during this saga. I have tried removal of the working module to see if it facilitates operation of the other but (really as expected) it made no difference.
I think realistically I have to do as mentioned before and set about stripping features out of the non-working isapi dll, recompiling and finding out exactly what is provoking this issue. I will also try another IIS installation, the current Win 2003 server has Plesk 9 installed and I want to remove this as a source of the problem. (Incidentally the Plesk 'reconfigurator' reports the non-working dll as having 'permissions problems'. It does not say what and the permissions for both dlls are the same displayed from within Plesk and also directly by IIS6.
All of this will take time, bear with me and I'll report back and close this all out in due course.

thanks again, RR
0
 
LVL 27

Expert Comment

by:BigRat
Comment Utility
RR

I don't quite see how a basic authentication gets sent to the client without yoy explcitly doing something to the http request. Unless you are accessing some resource which does not have the permissions, since IIS sets a token for access before calling you. So I'd check all the resources your dll accesses, like files, devices and databases.
0
 

Author Closing Comment

by:RetroRocker
Comment Utility
With reference to the problems I originally had with deploying an isapi dll on IIS6, there was a dependency which was missed and BigRat was correct.
The question then digressed a bit ! and moved onto permissions. If you're remotely interested :), this actually is much more involved than it first looks
because of the presence of Plesk. Deployment is straightforward if only IIS is involved but if you have Plesk installed on a server (by choice or not) then Plesk likes to tinker and it seems does not play well at all if you want to install an isapi dll into a virtual
directory of a sub domain. I wont go into a lot of detail but you have to manually add and configure some groups and users where subdomains are
involved but not for domains. BTW: This is when working with IIS directly, Plesk still digs its claws in and in fact I have yet to find a way of getting Plesk to allow an isapi dll to run on a sub domain by configuring it
from within Plesk. On trying this I found, that through Plesk, it told me that I was not allowed to change settings for this hmmmm :-( ... but you can do it
OK by yourself !

hope that it may help (not confuse :) any other soul who may pass by ... best regards RR
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now