cancel
Showing results for 
Search instead for 
Did you mean: 

DCOM with ASP.NET

Former Member
0 Kudos

Hi,

I'm trying to make a call to a RFC with a DCOM under ASP.NET (We want to continue using DCOM instead of migrating to NET Connector)

I've made a Windows App with VB.NET for testing purposes with the following code in the Load Event of Form1:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim DCOM As New DEVcZ_FM_RFC_OLLIELib.Z_FM_RFC_OLLIEClass, DCOMrs As Object, resultado As String

Dim s As String

DCOM.Destination = "PRD_CGT"

Call DCOM.Z_FM_RFC_OLLIE("081", "571153", DCOMrs, resultado)

s = DCOMrs(0).value

End Sub

The above code run sucessfully and the variable s at the end contains the data that I expected.

The thing is when I try to run the same code under the Page_Load event of a Deault.aspx.vb page:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim DCOM As New DEVcZ_FM_RFC_OLLIELib.Z_FM_RFC_OLLIEClass, DCOMrs As Object, resultado As String

Dim s As String

DCOM.Destination = "PRD_CGT"

Call DCOM.Z_FM_RFC_OLLIE("081", "571153", DCOMrs, resultado)

s = DCOMrs(0).value

End Sub

When the compiler reaches the line:

DCOM.Destination = "PRD_CGT"

The following error occurs:

An unhandled exception of type 'System.ExecutionEngineException' occurred in webtestapp.dll

Can Anyone tell How to call a DCOM proxy under a ASP.NET web page?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Elias, I want to know how DCOM works and the main differences with .NET Connector. I think with DCOM you don't need to create a proxy to call the BAPIs. Could you give me more info about these?

By the way I'm from Spain if you speak spanish or if you have an spanish phone write it to me to: ignacio.rabadan@accenture.com

Thanks

reiner_hille-doering
Active Contributor
0 Kudos

DCOM Component Connector was also proxy-based, just exactly the same as .NET Connector. But DCOM Connector is out of support, so it's not recommended to be used for new products.

Former Member
0 Kudos

Hola Ignacio,

Como dice Reiner Hille-Doering DCOM Connector es muy parecido a .Net Connector solo que el DCOM puede fácilmente ser instalado en el MTS (MS Transaction Server) pero ya no es soportado por SAP. Esa es la principal diferencia. Como todos nuestros desarrollos fueron creados bajo esta plataforma es dificil pensar en un migración al .Net Connector en un principio pero eso queremos seguir usando nuestros DCOMs pero bajo la plataforma .NET.

Te puede decir en resumen que el DCOM es exelente método para conectarse a SAP ya que el MTS administra todas las conexiones hacia SAP y lo hace muy eficiente. Pero tal parece que si usamos .NET tendremos que forzamente ocupar el .NET conector el cual no tenemos la certeza de que tan bien se comporte ya con Carga.

Espero te haya servido de algo que te digo y si llegas a tener alguna noticia de exito con el .Net Connector por favor avísame.

Former Member
0 Kudos

Reiner Ok I Know that DCOM is out but Do you know if DCOM can actually be used inside an ASP.NET page or web service? I have tried to used it but it keeps sending errors and exceptios like access denied etc. So I Know using .Net connector but still have the question if it's possible to use DCOM under ASP.NET... if you know the way I would highly apreciate your advice.

Thanks in advance.

reiner_hille-doering
Active Contributor
0 Kudos

I have no idea.

Former Member
0 Kudos

Hi,

It is technically possible to use DCOM Connector under ASP.NET. The error is most likely related to the security settings of the DCOM Connector in COM+ and the authentication mode of your ASP.NET application. By default, only the Windows users that are specified under "Roles" of the corresponding COM+ package can access the DCOM Connector.

Please try to configure your ASP.NET app to use "Integrated Windows Authentication" mode and run the ASP.NET app with the same Windows account as that you used when you with your WinForms app.

Hope it helps,

Guangwei

Former Member
0 Kudos

Hi Li,

I did what you said but it didn't work. But a friend sugested to changed the entry <processModel> in the machine.config file and it worked.

Thanks anyway.