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
+73-10Lines changed: 73 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) web 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,87 @@ 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.
49
+
50
+
1. In the **Namespace** box, enter the namespace that you want to use for the reference.
51
+
52
+
1. Click **OK** to add the reference to the project.
53
+
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**, choose the **Connected Services** node.
58
+
59
+
The **Connected Services** page opens.
60
+
61
+
1. Choose **Microsoft WCF Web Service Reference Provider**.
62
+
63
+
The **Configure WCF Web Service Reference** dialog appears.
64
+
65
+
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.
66
+
67
+
> [!NOTE]
68
+
> You should only reference services from a trusted source. Adding references from an untrusted source may compromise security.
69
+
70
+
You can also select the URL from the **URI** list, which stores the previous 15 URLs at which valid service metadata was found.
71
+
72
+
A progress bar displays when the search is being performed. You can stop the search at any time by clicking **Stop**.
73
+
74
+
1. In the **Services** list, expand the node for the service that you want to use and select an entity set.
41
75
42
-
4. In the **Namespace** box, enter the namespace that you want to use for the reference.
76
+
1. In the **Namespace** box, enter the namespace that you want to use for the reference.
43
77
44
-
5. Click **OK** to add the reference to the project.
78
+
1. Click **Finish** to add the reference to the project.
45
79
46
80
A service client (proxy) is generated, and metadata that describes the service is added to the *app.config* file.
47
81
82
+
::: moniker-end
83
+
48
84
### To add a reference to a service in the current solution
49
85
86
+
::: moniker range="vs-2017"
87
+
88
+
1. In **Solution Explorer**, choose the **Connected Services** node.
89
+
90
+
The **Connected Services** page opens.
91
+
92
+
1. Choose **Microsoft WCF Web Service Reference Provider**.
93
+
94
+
The **Configure WCF Web Service Reference** dialog appears.
95
+
96
+
1. Click **Discover**.
97
+
98
+
All services (both [!INCLUDE[ssAstoria](../data-tools/includes/ssastoria_md.md)] and WCF services) in the current solution are added to the **Services** list.
99
+
100
+
1. In the **Services** list, expand the node for the service that you want to use and select an entity set.
101
+
102
+
1. In the **Namespace** box, enter the namespace that you want to use for the reference.
103
+
104
+
1. Click **OK** to add the reference to the project.
105
+
106
+
A service client (proxy) generates, and metadata that describes the service is added to the *app.config* file.
107
+
::: moniker-end
108
+
::: moniker range=">=vs-2019"
50
109
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
110
52
111
The **Add Service Reference** dialog box appears.
53
112
54
-
2. Click **Discover**.
113
+
1. Click **Discover**.
55
114
56
115
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
116
58
-
3. In the **Services** list, expand the node for the service that you want to use and select an entity set.
117
+
1. In the **Services** list, expand the node for the service that you want to use and select an entity set.
59
118
60
-
4. In the **Namespace** box, enter the namespace that you want to use for the reference.
119
+
1. In the **Namespace** box, enter the namespace that you want to use for the reference.
61
120
62
-
5. Click **OK** to add the reference to the project.
121
+
1. Click **Finish** to add the reference to the project.
63
122
64
123
A service client (proxy) generates, and metadata that describes the service is added to the *app.config* file.
65
124
125
+
::: moniker-end
126
+
66
127
## Update a service reference
128
+
67
129
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
130
69
131
### To update a service reference
@@ -73,6 +135,7 @@ The Entity Data Model for a [!INCLUDE[ssAstoria](../data-tools/includes/ssastori
73
135
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
136
75
137
## Remove a service reference
138
+
76
139
If a service reference is no longer being used, you can remove it from your solution.
0 commit comments