Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

To solve this problem you need just check in the IIS the aplication pool of your website, search within advanced properties, the "Enable 32-Bit Aplications" and mark it as true, and that's it!

Regards.

2 REPLIES 2

DavidLY
Advisor
Advisor
0 Kudos

Hello,

Check if the SAP Note 1403357 helps.

Regards,

David

Former Member
0 Kudos

To solve this problem you need just check in the IIS the aplication pool of your website, search within advanced properties, the "Enable 32-Bit Aplications" and mark it as true, and that's it!

Regards.