You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-tools/how-to-add-update-or-remove-a-wcf-data-service-reference.md
+76-10Lines changed: 76 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -16,19 +16,27 @@ ms.workload:
16
16
- data-storage
17
17
---
18
18
# How to: Add, update, or remove a WCF data service reference
19
+
20
+
::: moniker range="vs-2017"
19
21
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.
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**.
28
36
29
-
The **Add Service Reference** dialog box appears.
37
+
The **Add Service Reference** dialog box appears.
30
38
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.
32
40
33
41
> [!NOTE]
34
42
> 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
37
45
38
46
A progress bar displays when the search is being performed. You can stop the search at any time by clicking **Stop**.
39
47
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.
41
49
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.
43
51
44
-
5. Click **OK** to add the reference to the project.
52
+
1. Click **OK** to add the reference to the project.
45
53
46
54
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
+

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
47
86
48
87
### To add a reference to a service in the current solution
49
88
89
+
::: moniker range="vs-2017"
90
+
50
91
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**.
51
92
52
93
The **Add Service Reference** dialog box appears.
53
94
54
-
2. Click **Discover**.
95
+
1. Click **Discover**.
55
96
56
97
All services (both [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] and WCF services) in the current solution are added to the **Services** list.
57
98
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.
59
100
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.
61
102
62
-
5. Click **OK** to add the reference to the project.
103
+
1. Click **OK** to add the reference to the project.
63
104
64
105
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
65
129
66
130
## Update a service reference
131
+
67
132
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.
68
133
69
134
### To update a service reference
@@ -73,6 +138,7 @@ The Entity Data Model for a [!INCLUDE[ssAstoria](../data-tools/includes/ssastori
73
138
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.
74
139
75
140
## Remove a service reference
141
+
76
142
If a service reference is no longer being used, you can remove it from your solution.
0 commit comments