Link to home
Start Free TrialLog in
Avatar of bmichene
bmichene

asked on

ISAPI DLL calling Net DLL on IIS 7

I have an ISAPI DLL written in Delphi 6 which calls a .Net DLL written in C#. I have it installed and running fine on a Windows 2003 Server running IIS6, however, in the new test environment running Windows 2008 server and IIS 7 I get an OLE exception in that it can't find the .net DLL. The .Net DLL is installed on both systems the same; The DLL is in the same folder off the C drive and was registered using REGASM.exe. In addition, the DLL was installed in the GAC (drag n drop to the Windows\Assembly folder). Were there some security changes with Server 2008 and/or IIS 7 that would prevent this setup (same for both Windows 2003 and Windows 2008 environments) to work?  Thanks.
Avatar of cj_1969
cj_1969
Flag of United States of America image

Could be a simple path problem ... check your path variable on the old machine and see if the directory of the second DLL is in there, if it is then add the path to the path variable on the new server.

Avatar of bmichene
bmichene

ASKER

The directory is not in the path of either machine.  I even tried moving the Net DLL to a folder in the path with no difference noted.  When an assembly is added to the GAC, does it require a reboot for the services to recognize the new assemblies?
According to this page drag-n-drop des not work for registering a DLL in the GAC.
You have to run a command line to do it ...
2- Type in this command to register or install the DLL file "mylib.dll"
gacutil /i c:\myfiles\mylib.dll
3- Now go to the GAC folder (c:\windows\assembly) and look for the DLL file you registered using using the command in Step 2. The DLL file should now appear in the GAC folder.

There is no reference as to whether this is for 2003 or 2008 so its worth a try.
You can do drag-n-drop but it requires an additional app "The Assembly Cache Viewer".

Here is a reference to working with the GAC ... http://msdn.microsoft.com/en-us/magazine/cc164080.aspx
According to this page ... http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/1c3ab849-84a0-4eb7-8c3b-b01fbca825a3 ... if you start the Windows explorer pointing the assemblies directory then drag-n-drop will work.  

"UPDATE: I discovered that it does work to create a shortcut to Windows Explorer which includes the path to the GAC (Target: %SystemRoot%\explorer.exe C:\Windows\assembly), which you can then invoke via Right-click, Run as Administrator. I put one on my desktop and labeled it "GAC" for quick access."
I've tried all the suggestions above and I've come to the conclusion that it has to be what rights/privileges IIS7 has to the folder where the .NET DLL/Assembly is located.  What I don't know is what privileges to give what account to that folder.
ASKER CERTIFIED SOLUTION
Avatar of cj_1969
cj_1969
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial