Microsoft stocktrader 2.03 Study Notes (6)-Configuration Service implementation example Guide (2)

Source: Internet
Author: User

Step 5: Add a TCP node service endpoint

In the previous step, we have completed a Host application that implements the configuration service.ProgramIn this step, we can use the Host application and adjust its configuration by configuring the website (configweb; here, we need to add a TCP-based node service endpoint to replace the default HTTP-based node service endpoint.

1.run the tutorial.host.exe Host Program (which can be started through F5 in Visual Studio ).

2. Open the configweb site (http: // localhost/configweb) in the browser ).

3. log on to configweb with the username "localadmin" and password "yyy" (or the logon password you have modified). Use http: // localhost: 8001/tutorial/config as the endpoint address.

4. Select the hosted SVCs menu item.

5. Click the select link in the node service host column. You need to add a new endpoint for the node service virtual host.

6. Click Add service endpoint.

7. Now you need to set the following values, and keep the default values for the rest.

Hosted service name:Tutorial node service TCP

Binding type:Customtcpbinding

Hostbindingconfigurationname:Host_nodesvc_customtcpbinding

Internal client configuration Name:Client_nodesvc_tcpbinding

Virtual Path:Tutorial/node

Port:8002 (make sure to change the port number to 8002, because the default port used for HTTP is already 8001 !)

Add Mex endpoint for this address:Checked (optional ).

8. Click Add.

9. This process usually takes several seconds.

10. Click return to hosted services for this virtual host.

11. Now you can see that the newly added endpoint has already appeared in the list, and the provided hosted service ID is 4.

12. Next we will activate the newly added TCP endpoint as the current node service endpoint.

13. Click the configuration menu to return to the configweb main interface.


14. Click the edit configuration link marked in red circles.

15. Click the change value link set for nodeactiveserviceid marked in the Red Circle (Be sure not to select an error here and select the nodeactivedcserviceid setting item above ).

16. Enter the value 4 in the text box, which is the hosted service ID of the TCP/binary endpoint you just added. The entered value is verified after submission and a prompt is given.

17. Click Update.

18. Click the configuration main menu item.

19. Click the SOA Map button marked in red circles.

20. Now you can see that the TCP endpoint is the activated node service endpoint. You can close the SOA Map window through a browser.

Through this example, we learned that it is so convenient and simple to configure the service application through the configuration website (configweb) adjustment. Sometimes we don't even need to modify any configuration files orCode, Let alone re-compile and deploy, You can adjust one setting to another. In addition, the underlying notification service can quickly notify other subsystems or cluster nodes of configuration adjustments. This may be the reason why the entire configuration service system has been talked about.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.