cancel
Showing results for 
Search instead for 
Did you mean: 

SAP.net Connector 2.0 runtime install?

Former Member
0 Kudos

Hello:

I've created a .net web service that implements the SAP.net connector (v2.0) to execute a bapi. I'm able to successfully invoke and test this web service from my localhost (same PC as used for development, therefore has the design-time SAP.net connector 2.0 components installed). When I installed this service on a different server (and installed the SAP.net connector 1.0 runtime) and attempted to invoke the service, I received a configuration error informing me that file or assembly name SAP.Connector or one of its dependencies is not found.

Is there a separate runtime install for version 2.0? I shouldn't need to install MS Visual Studio and the design-time SAP.net Connector 2.0 components on my server, correct?

Thanks,

-- Chris

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Esto podría ayudar.....

Para que funcione SAP Connector en un ambiente de 64 bits seguir los siguientes pasos:

1.- Dirigirse a las propiedades del proyecto que esten desarrollando (usumimos que ya hemos generado la conexión a SAP con .NET 2003 con Framework 1.1)

2.- Luego en la sección "Build" de nuestro proyecto ubicamos la opción "Platform target" y escogemos "x86"

3.- Asumimos que contamos con las siguientes dll traidas desde la carpeta c:WindowsSystem32 de nuestro ambiente de 32bits: librfc32.dll, msvcp71.dll, msvcr71.dll, SAP.Connector.dll y SAP.Conector.Rfc.dll

4.- Copiar el archivo librfc32.dll hacia la siguiente ruta C:WINDOWSsystem

5.- Copiar el archivo msvcp71.dll hacia la siguiente ruta C:WINDOWSsystem32

6.- Copiar los archivos msvcp71.dll y msvcr71.dll hacia la siguiente ruta C:WINDOWSSysWOW64

7.- Arrastrar los archivos SAP.Connector.dll y SAP.Conector.Rfc.dll hacia la siguiente ruta C:WINDOWSassembly

Si fuera necesario descarguense antes el "Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)" desde la pagina de microsoft, este archivo contiene dlls necesarias para un ambiente donde no se tiene instalado VS 2008.

Con eso me funcionó sin ningun problema.

Compartanlo!!!

Former Member
0 Kudos

Esto podría ayudar.....

Para que funcione SAP Connector en un ambiente de 64 bits seguir los siguientes pasos:

1.- Dirigirse a las propiedades del proyecto que esten desarrollando (usumimos que ya hemos generado la conexión a SAP con .NET 2003 con Framework 1.1)

2.- Luego en la sección "Build" de nuestro proyecto ubicamos la opción "Platform target" y escogemos "x86"

3.- Asumimos que contamos con las siguientes dll traidas desde la carpeta c:WindowsSystem32 de nuestro ambiente de 32bits: librfc32.dll, msvcp71.dll, msvcr71.dll, SAP.Connector.dll y SAP.Conector.Rfc.dll

4.- Copiar el archivo librfc32.dll hacia la siguiente ruta C:WINDOWSsystem

5.- Copiar el archivo msvcp71.dll hacia la siguiente ruta C:WINDOWSsystem32

6.- Copiar los archivos msvcp71.dll y msvcr71.dll hacia la siguiente ruta C:WINDOWSSysWOW64

7.- Arrastrar los archivos SAP.Connector.dll y SAP.Conector.Rfc.dll hacia la siguiente ruta C:WINDOWSassembly

Si fuera necesario descarguense antes el "Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)" desde la pagina de microsoft, este archivo contiene dlls necesarias para un ambiente donde no se tiene instalado VS 2008.

Con eso me funcionó sin ningun problema.

Compartanlo!!!

Former Member
0 Kudos

Hello,

As is suggested by Reiner, I have placed the three DDL (SAP.Connector, SAP.Connector.RFC and LIBRFC32) on the application's /bin directory, packed them and then deployed the application to a server.

The application's default page is loaded but as soon as I click on a button, I got this message:

System.DllNotFoundException: Unable to load DLL (librfc32.dll). at SAP.Connector.Connection.Open() at SAP.Connector.SAPLoginProvider.OpenSAPConnection(Page p, String connstr, Boolean persist) at StepsData.SAPLogin1.Login_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\StepsData\SAPLogin1.aspx.cs:line 97

Would you please help me?

Thank you,

Kiyomi

Former Member
0 Kudos

Hi Kiyomi,

Copy the Librfc32.dll to the system32 directory. It's an unmanaged dll.

Regards.

Former Member
0 Kudos

Thank you, Jitesh, for your reply.

Yes, I first had copied the librfc32.dll to c:\WINDOWS\System32 and tried, but it did not work (the same error message). Therefore, I thought of packing this dll together with other two, but I still have the same error. I have removed librfc32.dll from the application, but the result is still the same.

What would you think is wrong? I would very much appreciate your kind help.

Thank you,

Kiyomi

Former Member
0 Kudos

I was just wondering if this was ever fixed. I'm having the same issue when I run the application it states that it cannot find the LIBRFC32.DLL even though it is in both the BIN directory and the System32.

Anybody?

Former Member
0 Kudos

Ok, since nobody else had any ideas, I'll let everyone know how I solved this in the interim. I've read posts to not use the "runtime" install package (which I actually don't have) and simply put the two SAP dll's in the GAC, and the LIBRFC32.DLL in the System32 directory since that's all the runtime install does. I find this as a wrong answer.

Since I don't have the runtime install package, I actually installed Visual Studio 2003 on the web server and then installed the SAP.NET connector (full install) on the machine. Guess What......IT WORKED.

As soon as I installed the SAP.NET connector on the machine, no more missing DLL message. Everything worked as planned.

I'm hoping to acquire the runtime install today to try on another Server and see how that goes.

Matt

Former Member
0 Kudos

I have installed Visual Studio 2003 as well as SAP.NET connector 2 on the web server.

But I still receive the same message. Do you have any other ideas?

Thank you,

Kiyomi

Former Member
0 Kudos

Hi

Having a similar problem. I developed a web based app locally on my windows 32-bit machine - works fine, talks to 64bit SAP etc. It's a job monitor and uses the XBP interface to check what's running/failed etc.

When I deploy it to a 64bit server, I don't get any errors, but it just returns a zero results set from SAP - logs on fine etc, just zero results.

If I had any hair, I'd be tearing it out!

If anyone has any suggestions I'd be grateful.

Thanks

Martin Dolphin

Bentley Motors Limited

Former Member
0 Kudos

Martin,

did you had any luck with the 64-bit server, calling SAP?

Regards

Miguel

Former Member
0 Kudos

Hi Chris, hi Reiner,

I have a similar/same problem here.

deploying the SAP.Connector.DLL, SAP.Connector.Rfc.DLL to GAC and librfc32 to system32 worked well

But I want to achieve the other version, so i can leave the old (620-versioned) librfc32.dll in system32 untouched.

The problem stays when i try to copy all files to the app folder and i get the same error as Chris . Can the problem be that the corresponding .tbl cannot be found and is needed? I tried to register it with

regasm /tlb:SAP.Connector.tlb SAP.Connector.dll

but it did not help. Are there any other ideas? Did i forget something?

can we use librfc32.dll version 620 with SAP NCo?

Greetings

Message was edited by: Michael May

Former Member
0 Kudos

Hi Michael:

My error was that when I copied these files to my application folder, I had not originally copied them into the bin subdirectory (as Reiner subsequently pointed out to me). When I did so, the error was resolved and my application worked as intended (without moving anything to GAC or System32, and without using regasm).

Hope this helps,

-- Chris

reiner_hille-doering
Active Contributor
0 Kudos

Hi Michael,

don't regasm SAP.Connector.dll. Regasm would try to register classes for COM, but there are no COM-enabled classes in SAP.Connector.

Side-by-side versioning of LIBRFC32 and the connector assemblies should work if you consider the assembly- and DLL-loading rules:

SAP.Connector.dll and SAP.Connector.Rfc.dll are strongly-named managed assemblies. If they are in GAC, they are ALLWAYS loaded from there. But GAC allows having multiple version (e.g. 1.0 and 2.0) in parallel). If you want to load them from a local directory, DON'T put them into GAC.

LIBRFC32.DLL is a normal (unmanaged) DLL. This is tried to be loaded in the following order:

- Application's EXE directory.

- Application's Current Working directory.

- All directories in PATH variable.

For ASP.NET it's hard to say what the EXE-directory and current working directory are, but I assume that at least one of them points to the local "bin" directory.

Former Member
0 Kudos

Hi Reiner,

Thank you for your detailed explanation, that helped me a big step further in understanding how to do it.

Keep on the good work in this forum!

Greetings

Michael

reiner_hille-doering
Active Contributor
0 Kudos

Don't use the runtime setup 1.x.

Just pack you applicacation together with the needed DLLs from your development system:

- SAP.Connector.DLL

- SAP.Connector.Rfc.DLL

- LIBRFC32.DLL

You can copy all three files to your application directory or put the first two into GAC and the last to SYSTEM32.

Former Member
0 Kudos

Thanks, Reiner. I've followed your advice (uninstalled the 1.x runtime, copied the specified files to the application directory). I'm still getting the same error. Can you help me to understand this:

Parser Error Message: File or assembly name SAP.Connector, or one of its dependencies, was not found.

Source Error:

Line 12: <compilation defaultLanguage="vb" debug="true">

Line 13: <assemblies>

Line 14: <add assembly="SAP.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=50436dca5c7f7d23" />

Line 15: <add assembly="SAP.Connector.Rfc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=50436dca5c7f7d23" />

Line 16: </assemblies>

Source File: D:\Inetpub\wwwroot\WSSAPConnectRPM\web.config Line: 14

Assembly Load Trace: The following information can be helpful to determine why the assembly 'SAP.Connector' could not be loaded.

=== Pre-bind state information ===

LOG: DisplayName = SAP.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=50436dca5c7f7d23

(Fully-specified)

LOG: Appbase = file:///D:/Inetpub/wwwroot/WSSAPConnectRPM

LOG: Initial PrivatePath = bin

Calling assembly : (Unknown).

===

LOG: Publisher policy file is not found.

LOG: No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet.config).

LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.

LOG: Post-policy reference: SAP.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=50436dca5c7f7d23

LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/wssapconnectrpm/25c6acd1/779998e0/SAP.Connector.DLL.

LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/wssapconnectrpm/25c6acd1/779998e0/SAP.Connector/SAP.Connector.DLL.

LOG: Attempting download of new URL file:///D:/Inetpub/wwwroot/WSSAPConnectRPM/bin/SAP.Connector.DLL.

LOG: Attempting download of new URL file:///D:/Inetpub/wwwroot/WSSAPConnectRPM/bin/SAP.Connector/SAP.Connector.DLL.

LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/wssapconnectrpm/25c6acd1/779998e0/SAP.Connector.EXE.

LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/wssapconnectrpm/25c6acd1/779998e0/SAP.Connector/SAP.Connector.EXE.

LOG: Attempting download of new URL file:///D:/Inetpub/wwwroot/WSSAPConnectRPM/bin/SAP.Connector.EXE.

LOG: Attempting download of new URL file:///D:/Inetpub/wwwroot/WSSAPConnectRPM/bin/SAP.Connector/SAP.Connector.EXE.

Thanks again,

-- Chris

reiner_hille-doering
Active Contributor
0 Kudos

Where exactly did you put SAP.Connector.DLL and SAP.Connector.Rfc.DLL to? To "D:/Inetpub/wwwroot/WSSAPConnectRPM/bin"? Did you also try GAC?

Former Member
0 Kudos

Thx Reiner, excellent reply!