Use the WCF Service configuration editor and the wcf configuration editor.
I learned about wcf, especially for beginners. It is difficult to understand the configuration file. It is a bit complicated. How much energy can I configure manually? Isn't it enough, therefore, it is necessary to use the configuration editor. The following is a learning flowchart.
Open the tool's wcf Service configuration editor and click File = to open the = configuration file (find the app in your project. config file), the service is empty. Click Create service, browse find dll file, click File to add service type
Click Next. Click Next. By default, http is selected Next. Next, the following page is displayed. Enter the endpoint address and click Next.
After the creation is complete, the so-called ABC is configured. Just follow the configuration below and click Save. In this way, the server configuration file is configured. You can write code to open the service.
The following Operation adds the service configured above, so a service behavior must be added. Otherwise, the following client cannot be added. The httpgeturl shown below is the address used by the client to add the service reference.
Service configuration is fine.
For the client, open the wcf Editor, create a client endpoint, configure the address to bind the client, and name it clientPoint.
Of course, the client also needs to add service reference, run the Service (must be in the running state), and add the configured service address to the service reference.
Congratulations! You have graduated.
How to configure the WCF Service
The user account running the WCF Service must have access to the BizTalk management database to extract the BizTalk receiving location information. An easy way to ensure that your account has access to required BizTalk configuration information is to add your account to the BizTalk Isolated Host Users Group on your computer. The following procedure is displayed so that the service can access the BizTalk management database and use the IIS manager to test the WCF Service. Configure the WCF Service, click Start, and then click Control Panel ". If you see "classic view" in the left pane, click it. Double-click "Administrative Tools ". Double-click "IIS manager ". Expand your computer name, site, and default website ". Right-click the name of the WCF Service proxy for BizTalk business flow, go to "Manage Website", and click "Advanced Settings ". Write down the name of the application pool and click Cancel ". Click "application pool" on the left of the Resource Manager window ". Verify that the application pool ID recorded in Step 7 is a member of the BizTalk Isolated Host Users Group on the computer. If not, you should change the ID of the application pool, or use an application pool that has a member of the BizTalk Isolated Host Users Group on the computer. If you have configured Web applications to use the application pool under the user account of a member of the BizTalk Isolated Host Users Group on your computer, skip the remaining steps in this process. Right-click application pool and then click Add application pool ". In the Add application pool dialog box, type the name of the application pool and click OK ". Right-click the name of the application pool in the application pool list, and click Advanced Settings ". Expand "Process Model" and change the "identifier" value from "NetworkService" to "SpecificUser ". For "identify SpecificUser credenuser", click the ellipsis (...). Enter the name as the "user name ". This user must be a member of the BizTalk Isolated Host Users Group on the computer. Type and confirm the password, and then click OK ". In the Advanced Settings dialog box, click OK ". Right-click the WCF Web application and click "Advanced Settings ". For "application pool", select the application pool you just created and click "OK ". In IIS manager, click the name of the WCF application. Click content view in the lower right corner ". Right-click the SVC file and Click Browse ". Verify that Internet Explorer displays the WCF Service Page. If it fails, use the diagnostic information displayed in Internet Explorer to solve the problem.
How does wcf configure an external server? Some localhosts do not solve the problem?
This should be the server configuration, right? Do not use the class library. baseAddress is the Endpoint of the WCF Service you want to open. It is generally the local IP address + port + a name that can represent the service content. For example: