Hummingbird API COM communication on ASP.Net and WinForms

August 23, 2006 · Posted by Jeremy Thake
4 Comments · Trackback Url

I've been doing some .Net 2.0 development with a Web Service to communicate with the DM server via the COM API. I have written a Class Library which both a Windows Forms app uses and a Web Service uses. I've deployed these to a standard Windows 2003 SP1 machine and the Windows Form app works, but the Web Service call fails with the below error:
System.ApplicationException: Error -2147220997 occured: Cannot load the DM Server interface. The DM server may not be started.
at Alphawest.ThirdParty.Hummingbird.HMDMConnector.checkErrorPCDLogin(PCDLogin login) in D:\Projects\HummingbirdDMWindowsApplication\HMDMConnector\HMDMConnector.cs:line 275
at Alphawest.ThirdParty.Hummingbird.HMDMConnector.Login(Int16 networkType, String library, String domain, String username, String password) in D:\Projects\HummingbirdDMWindowsApplication\HMDMConnector\HMDMConnector.cs:line 26
at Alphawest.Web.Services.ThirdParty.Hummingbird.HMDMConnectorWS.Login(Int16 networkType, String library, String domain, String username, String password) in D:\Projects\HummingbirdDMWindowsApplication\HMDMConnectorWS\HMDMConnectorWS.asmx.cs:line 38
I've also tried writing this directly into a web page rather than a web service call and get the same error. There appear to be no errors in the Windows Event Viewer.

I've been digging a bit in the last half hour. I guessed it was permissions between IIS and COM. You can set the Application Identity User in ASP.NET 2.0 in the IIS web site Property page under the ASP.NET tab Configuration Button. Basically the Configuration is a UI for editing the web.config of the ASP.NET web application. It adds this line under <system.web> element.
 
<identity impersonate="true" userName="user" password="password" />
This seems to crack it if you have the correct domain user name and password in there.
 
Hope this helps someone else later down the track!

Tags:diigo it



4 responses so far


  • Tuesday, 8 Jul 2008 02:46 by Doug Hughes
    I'm just dabbling in the Hummingbird API and am far more familiar with Unix than native windows. I saw a web page that suggested using the VB editor in Excel as a platform - seems to work ok but I'm getting the same error you did with your .net experience. I know nothing of the IIS web site or ASP.net, where is this found on a standard XP machine? thanks, Doug
  • Wednesday, 9 Jul 2008 05:30 by Doug Hughes
    I'm just dabbling in the Hummingbird API and am far more familiar with Unix than native windows. I saw a web page that suggested using the VB editor in Excel as a platform - seems to work ok but I'm getting the same error you did with your .net experience. I know nothing of the IIS web site or ASP.net, where is this found on a standard XP machine? thanks, Doug
  • Wednesday, 9 Jul 2008 12:48 by Doug Hughes
    I'm just dabbling in the Hummingbird API and am far more familiar with Unix than native windows. I saw a web page that suggested using the VB editor in Excel as a platform - seems to work ok but I'm getting the same error you did with your .net experience. I know nothing of the IIS web site or ASP.net, where is this found on a standard XP machine? thanks, Doug
  • Wednesday, 22 Oct 2008 02:34 by

 

Name:
URL:
Email:
Comments: