If you use a .NET program as an RFC server, your SAP system can handle .NET code exactly as it would handle another SAP system. It can send a function call to the .Net Server and receive the result.
The .NET Server is defined as an RFC destination in the SAP system.
As of SAP Web AS 6.10, the SAP .NET Connector can communicate with the SAP system either by RFC or using the SOAP protocol. Up to and including SAP_BASIS release 4.6D, communication is only possible using RFC.
As long as the SAP .NET Connector server and the SAP system are both within a firewall, communication can occur using both RFC and SOAP, although in this situation using an RFC connection achieves considerably better performance. For communication outside the firewall, SOAP must be used.
The .NET Server is configured as an RFC destination in the SAP system in exactly the same way as any other (external) RFC server, using transaction SM59.