Skip to content

Commit e5639c6

Browse files
authored
Merge pull request #6487 from ghogen/data-tools
Data Tools: WCF add/remove reference - updates
2 parents da5ebc2 + 572baa4 commit e5639c6

File tree

2 files changed

+76
-10
lines changed

2 files changed

+76
-10
lines changed

docs/data-tools/how-to-add-update-or-remove-a-wcf-data-service-reference.md

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,27 @@ ms.workload:
1616
- data-storage
1717
---
1818
# How to: Add, update, or remove a WCF data service reference
19+
20+
::: moniker range="vs-2017"
1921
A *service reference* enables a project to access one or more [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)]. Use the **Add Service Reference** dialog box to search for [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] in the current solution, locally, on a local area network, or on the Internet.
22+
::: moniker-end
23+
::: moniker range=">=vs-2019"
24+
You can use the **Connected Services** node in **Solution Explorer** to access the **Microsoft WCF Web Service Reference Provider**, which lets you manage Windows Communication Foundation (WCF) data service references.
25+
::: moniker-end
2026

2127
[!INCLUDE[note_settings_general](../data-tools/includes/note_settings_general_md.md)]
2228

23-
## Add a service reference
29+
## Add a WCF service reference
2430

2531
### To add a reference to an external service
2632

33+
::: moniker range="vs-2017"
34+
2735
1. In **Solution Explorer**, right-click the name of the project to which you want to add the service, and then click **Add Service Reference**.
2836

29-
The **Add Service Reference** dialog box appears.
37+
The **Add Service Reference** dialog box appears.
3038

31-
2. In the **Address** box, enter the URL for the service, and then click **Go** to search for the service. If the service implements user name and password security, you may be prompted for a user name and password.
39+
1. In the **Address** box, enter the URL for the service, and then click **Go** to search for the service. If the service implements user name and password security, you may be prompted for a user name and password.
3240

3341
> [!NOTE]
3442
> You should only reference services from a trusted source. Adding references from an untrusted source may compromise security.
@@ -37,33 +45,90 @@ A *service reference* enables a project to access one or more [!INCLUDE[ssAstori
3745

3846
A progress bar displays when the search is being performed. You can stop the search at any time by clicking **Stop**.
3947

40-
3. In the **Services** list, expand the node for the service that you want to use and select an entity set.
48+
1. In the **Services** list, expand the node for the service that you want to use and select an entity set.
4149

42-
4. In the **Namespace** box, enter the namespace that you want to use for the reference.
50+
1. In the **Namespace** box, enter the namespace that you want to use for the reference.
4351

44-
5. Click **OK** to add the reference to the project.
52+
1. Click **OK** to add the reference to the project.
4553

4654
A service client (proxy) is generated, and metadata that describes the service is added to the *app.config* file.
55+
::: moniker-end
56+
::: moniker range=">=vs-2019"
57+
1. In **Solution Explorer**, double-click or tap the **Connected Services** node.
58+
59+
The **Configure Services** tab opens.
60+
61+
1. Choose **Microsoft WCF Web Service Reference Provider**.
62+
63+
The **Configure WCF Web Service Reference** dialog appears.
64+
65+
![Screenshot of WCF Web Service Provider dialog box](media/vs-2019/configure-wcf-web-service-reference-dialog.png)
66+
67+
68+
1. In the **URI** box, enter the URL for the service, and then click **Go** to search for the service. If the service implements user name and password security, you may be prompted for a user name and password.
69+
70+
> [!NOTE]
71+
> You should only reference services from a trusted source. Adding references from an untrusted source may compromise security.
72+
73+
You can also select the URL from the **URI** list, which stores the previous 15 URLs at which valid service metadata was found.
74+
75+
A progress bar displays when the search is being performed. You can stop the search at any time by clicking **Stop**.
76+
77+
1. In the **Services** list, expand the node for the service that you want to use and select an entity set.
78+
79+
1. In the **Namespace** box, enter the namespace that you want to use for the reference.
80+
81+
1. Click **Finish** to add the reference to the project.
82+
83+
A service client (proxy) is generated, and metadata that describes the service is added to the *app.config* file.
84+
85+
::: moniker-end
4786

4887
### To add a reference to a service in the current solution
4988

89+
::: moniker range="vs-2017"
90+
5091
1. In **Solution Explorer**, right-click the name of the project to which you want to add the service, and then click **Add Service Reference**.
5192

5293
The **Add Service Reference** dialog box appears.
5394

54-
2. Click **Discover**.
95+
1. Click **Discover**.
5596

5697
All services (both [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] and WCF services) in the current solution are added to the **Services** list.
5798

58-
3. In the **Services** list, expand the node for the service that you want to use and select an entity set.
99+
1. In the **Services** list, expand the node for the service that you want to use and select an entity set.
59100

60-
4. In the **Namespace** box, enter the namespace that you want to use for the reference.
101+
1. In the **Namespace** box, enter the namespace that you want to use for the reference.
61102

62-
5. Click **OK** to add the reference to the project.
103+
1. Click **OK** to add the reference to the project.
63104

64105
A service client (proxy) generates, and metadata that describes the service is added to the *app.config* file.
106+
::: moniker-end
107+
::: moniker range=">=vs-2019"
108+
1. In **Solution Explorer**, double-click or tap the **Connected Services** node.
109+
110+
The **Configure Services** tab opens.
111+
112+
1. Choose **Microsoft WCF Web Service Reference Provider**.
113+
114+
The **Configure WCF Web Service Reference** dialog appears.
115+
116+
1. Click **Discover**.
117+
118+
All services (both [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] and WCF services) in the current solution are added to the **Services** list.
119+
120+
1. In the **Services** list, expand the node for the service that you want to use and select an entity set.
121+
122+
1. In the **Namespace** box, enter the namespace that you want to use for the reference.
123+
124+
1. Click **Finish** to add the reference to the project.
125+
126+
A service client (proxy) generates, and metadata that describes the service is added to the *app.config* file.
127+
128+
::: moniker-end
65129

66130
## Update a service reference
131+
67132
The Entity Data Model for a [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] sometimes changes. When this happens, you must update the service reference.
68133

69134
### To update a service reference
@@ -73,6 +138,7 @@ The Entity Data Model for a [!INCLUDE[ssAstoria](../data-tools/includes/ssastori
73138
A progress dialog box displays while the reference is updated from its original location, and the service client is regenerated to reflect any changes in the metadata.
74139

75140
## Remove a service reference
141+
76142
If a service reference is no longer being used, you can remove it from your solution.
77143

78144
### To remove a service reference
Loading

0 commit comments

Comments
 (0)