Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webservice call to DLL Failing

Status
Not open for further replies.

dellyjm

Programmer
Apr 13, 2000
168
0
0
JM
Hi everyone I'm trying to call a COM DLL from my webservice. The webservice and COM DLL are on the same machine. I am able to access the methods but when I try and run the methods. I get an error stating the OLE DB Service Component couldnot find the specified module. anyone have any insight?

Delton
 
I thought that you had to 'include' the com DLL in a wrapper so that ASP.NET could use it. What I did was use the VS command prompt (Located in the programs menu in the tools submenu).

First as with all com DLL's you have to register them on window machines. You can do this from any command prompt. Click the Start button->Run type cmd for the console.
Navigate to the directory that the COM DLL file is (I usually put them in the system32 folder.)

Type:> Regsvr32 your_com.DLL

exit the console and then go to the VS command prompt:
Start->Programs->VStudi..->VS TOOLS->Command Prompt

Type:> tlbimp your_com.DLL /out:your_com_aspx.dll

Now using file explorer copy the new dll to you webapp's bin folder. Then using your VS.NET right click the references in your solutions explorer (where your whole web app is) Select add Reference. Browse to the new dll in your bin folder. Click OK and you now have a usable .NET reference.

There are probably many more ways to do this with out VS.NET but hey thats what I have.

Hope that this helps you.

PS You will see that there is now an interop class in your references. Perhaps that is what that error means.
Klaz
 
If you've added the reference and created the RCW, do you know if the COM component has been installed on the machine with RegSrv32?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top