Home > front end >  RTX Server SDK across servers
RTX Server SDK across servers

Time:12-10

Reverse single sign-on RTX, i.e., log on to the other system, tencent passed after login tencent on other systems don't have to enter the user name and password to login, there may be two kinds of circumstances, tencent and other systems on the same Server or on a different Server, to be called tencent pass login authentication interface of the system must be installed RTX Server SDK (RTX Server installation is the 2013 version of RTX Server SDK installation is 2015 version), project reference SDK installation "APIObject. DLL files in the directory,

Environment:

RTX server version is 2013, machine, called "A machine", IP for "192.168.0.88
"
Step 1: install the Rtx Server SDK

Installed on the machine of the need to call RTX interface RTX Server SDK, here to provide an interface is RTX2015 rtxserversdk2015formal. Zip, close any available

Step 2: modify the RTX server configuration, add the white list of IP and port

1> The development environment and RTX Server on the same machine, namely RTX Server SDK and RTX servers on the same machine

The following is the official code, is the development environment and RTX server on the same machine,

Copy the code
1 string strName=HttpContext. Current. Request. The QueryString (" user ");

2 string strSign=HttpContext. Current. Request. The QueryString (" sign ");

3

4

5 RTXSAPILib. IRTXSAPIRootObj RootObj=new RTXSAPILib. RTXSAPIRootObjClass ();

6 RTXSAPILib. IRTXSAPIUserAuthObj2 AuthObj2=(RTXSAPILib. IRTXSAPIUserAuthObj2) RootObj. UserAuthObj;

7

8 the Response. The Write (strName);

The Response of 9. Write (strSign);

10

11 bool bOK=AuthObj2. SignatureAuth (strName strSign);

12

13 if (bOK==true)

14 {

15 Response. Redirect (" OA. HTML ");

16}

17 the else

18 {

19 the Response. Redirect (" error. HTML ");

20}

Copy the code
2> The development environment and RTX Server on different machines, namely RTX Server SDK and RTX Server installed on different machines

RTX Server SDK: A machine, IP for 192.168.0.88

RTX server: B machine, IP for 192.168.0.120

2.1 & gt; A machine, modify the SDK configuration

Open Tencent/RtxSSDK RtxServerApi ini file, modify the Host machine for B IP

[Common]

The Host=192.168.0.120

Port=6000

2.1 & gt; B machine, modify the configuration files of the Rtx server

First, modify the code, need to modify the official code, specify the RTX service IP and port;

Second, modify RTX configuration server, the default RTX server allows only native calls SDK, if other machines need to call, you must modify RTX server installation directory of the following two files

192.168.0.88 SDKproperty. XML file, add node

Copy the code




127.0.0.1

192.168.0.88





Copy the code
192.168.0.88 AppConnConfig. XML file: add node

Copy the code




127.0.0.1

192.168.0.88





Copy the code
Third, restart RTX server configuration to take effect,

Copy the code
1 string strName=HttpContext. Current. Request. The QueryString (" user ");

2 string strSign=HttpContext. Current. Request. The QueryString (" sign ");

3

4

5 RTXSAPILib. IRTXSAPIRootObj RootObj=new RTXSAPILib. RTXSAPIRootObjClass ();

6 RTXSAPILib. IRTXSAPIUserAuthObj2 AuthObj2=(RTXSAPILib. IRTXSAPIUserAuthObj2) RootObj. UserAuthObj;

7

8 the Response. The Write (strName);

The Response of 9. Write (strSign);

10

11 RootObj. ServerIP="192.168.0.88";

12 RootObj. ServerPort=8006;

13 bool bOK=AuthObj2. SignatureAuth (strName strSign);

14

15 the if (bOK==true)

16 {

17 Response. Redirect (" OA. HTML ");

18}

19 the else

20 {

21 Response. Redirect (" error. HTML ");

22}

Copy the code
Step 3: open port 8006

The SDK need to call port 8006, at the command line open Telnet to see if the port

1 Telnet 192.168.0.88 8006

If the port is not open by the following steps to open port 8006

Windows firewall & gt; Advanced Settings & gt; Inbound rules & gt; The new rules

First, open the computer control panel, and then find the firewall in the control panel;

How to open port
In the firewall Settings on the left to choose click advanced Settings;

How to open port
Senior security Settings, we click options on the left side of the inbound rules;

How to open port
In the right column can choose to click on the new rules;

How to open port
Rule type choose port type;

How to open port
Choose TCP protocol, a specific port, port itself, such as 4444;

How to open port
Operation strategy option allows connection;

How to open port
When to apply the rules, the default selection;

How to open port
Port name and description, since the fitting;

How to open port
, we see create inbound rules, the port allows,

How to open port
Step four: WCF published to the IIS

RTX interface is 32-bit, basic is a 64 - bit machine, now in vs debug interface is not an error, but is published to the iis error,

Solution: the interface encapsulation into WCF published to the iis, Interop. RTXSAPILib. This is a 32-bit DLL opening iis application pool to 32-bit applications is set to true can

CodePudding user response:

,,,,,,,,, this is the place to ask questions
  • Related