Skip to Content
0

Sapnco.dll Rfc Server connection issues

Apr 13 at 03:33 PM

49

avatar image

I have built an Rfc server in dot net as per Spotlight on Connector and How to build an rfc server using the sapnco v3.0 dll However, it is unable to connect to my sap system, the error is "service '?' is unknown". I have tried setting the parameters in the app.config and also directly in the code, but no luck. Do I need to do anything special in SAP to enable the gateway host? In my sm59 transaction i specified "sapgw00" as the gateway service. Is the gateway host value just the ip address of the sap machine? I have already successfully used the non-server features of sapnco.dll to call bapi's and remote enabled functions, it is just the rfc server code which is failing at line

server.Start();

Thanks for any assistance!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Antal Perger
Apr 13 at 04:10 PM
0

Hi Marcus,

Instead of service name (sapgwnn) enter the port number of the ABAP gateway. The default gateway port number is 33nn, where nn is the instance number. The gateway port number can be checked in the dev_rd file, for example:

Bind service 3301 (socket) to port 3301

The "service is unknown" message indicatres that services file does not contain the sapgwnn entry. See SAP note

896973 - Service 'xyz' unknown; error in getservbyname/getaddrinfo

Best regards,

Antal

Share
10 |10000 characters needed characters left characters exceeded
Antal Perger
Apr 23 at 07:29 AM
0

Hi Marcus,

In SMGW transaction in menu Goto - "Logged on clients" list the registered program ID of the RFC server can be seen. If 5 server process is configured, 5 registered program ID will be listed.

Best regards,

Antal

Share
10 |10000 characters needed characters left characters exceeded
Marcus Scholz Apr 23 at 04:08 AM
0

Thanks Antal, changing SAPGW00 to 3300 allowed my code to connect. Should I be able to see my RFC program running using SMGW after the dot not code has connected?

Share
10 |10000 characters needed characters left characters exceeded
Marcus Scholz Apr 26 at 07:00 AM
0

Thanks Antal.

I am now trying to invoke function STFC_Connection via transaction se37 to see if it communicates back to my running dot net server code. The RFC destination is configured rfcdestination.jpg I see in SMGW that my server is running smgw.jpg . Invoking STFC_Connection returns "Communication Failure", I specified the name of my RFC Destination as the target system (CPSQL01) stfc-connection.jpg . Is this the correct way to make the STFC_CONNECTION talk back to my dot net code?

Thanks for your assistance.


rfcdestination.jpg (89.2 kB)
smgw.jpg (74.7 kB)
Share
10 |10000 characters needed characters left characters exceeded