Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ASP.NET and DI API error!!

Hi everybody, I'm begining to develop an intercface between SAP and the Web, but I can't use DI Server, Because of a DI Server's Licences cost (Too much expensive for the client).

I can login into SAP through DI API, but when I'm trying this code I got the next error:

  • Error:

System.InvalidCastException:

Unable to cast COM object of type 'System.__ComObject' to interface type 'SAPbobsCOM.BusinessPartners'.

This operation failed because the QueryInterface call on the COM component for the interface with IID '{9DF321C2-6A1D-446B-AE8A-F7C33987D792}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

at sapwebservice.DataInterfase.ClientInvoiceList(String ClientAccount) in C:\Users\Usuario\Documents\Visual Studio 2008\Projects\sapwebservice\sapwebservice\DataInterfase.cs:line 76

at sapwebservice.Service1.InoviceList(String sClientAccount) in C:\Users\Usuario\Documents\Visual Studio 2008\Projects\sapwebservice\sapwebservice\Service1.asmx.cs:line 35

  • Code:

oBusinessPartners = (SAPbobsCOM.BusinessPartners)(oDICompany.GetCompanyService().GetBusinessService(ServiceTypes.BusinessPartnersService));

  • Software:

I'm using MVWD .NET 2008 Express With C# interface

OS: Windows Vista Home Premium

I hope you can help me.

Thanks!

--

Enriquillo Guigni

Not what you were looking for? View more on this topic or Ask a question