Skip to Content
0
Former Member
May 23, 2013 at 07:03 PM

Error consuming RFC from VB: System.Exception: Cannot create ActiveX component.

178 Views

Using the code for connection to RFC from VB, we are accessing several RFCs, thus we created a Web Service which stayed at IIS.
In development works perfectly running locally, however when uploading to IIS server, presents the error System.Exception: Cannot create ActiveX component.

System.Exception: Cannot create ActiveX component.

at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)

at pruebaWS.ConveniosSoapServer.RFC_CONECTION1(String isInNet) in C:\Users\Admin\Desktop\pruebaWS\pruebaWS\pruebaWS\ConveniosSOAPServer.vb:line 15

at pruebaWS.ConveniosSoapServer.ServicioDisponible() in C:\Users\Admin\Desktop\pruebaWS\pruebaWS\pruebaWS\ConveniosSOAPServer.vb:line 330

at pruebaWS.Convenios.ServicioDisponible() in C:\Users\Admin\Desktop\pruebaWS\pruebaWS\pruebaWS\Convenios.asmx.vb:line 40

Being:

line 15 this line is inside the method RFC_CONECTION1

functionCtrl = CreateObject("SAP.Functions")

line 330 this line is inside the method ServicioDisponible

RFC_CONECTION1(0)

line 40 this line is inside the web method that gives the error

Dim response As ServicioDisponibleRes = convenio.ServicioDisponible()

Apparently just the application does not have access to SAP dll, or missing any permission from IIS, I tried many things but still not successful.

Microsoft Visual Basic 2010, Microsoft .NET Framework 4.0

Windows Server 2008 R2 Enterprise SP1, IIS 7

SAP GUI for Windows 7.20