Example 1: Running a Web Method Bound to a Stored Procedure from C#
Using Visual Studio 2008, create a new web application or website and name it SQLWebServicesClient
. Next, add a web reference to the SQL Server web service created in Listing 48.3. To do this, you right-click the project name in the Server Explorer window and select Add Web Reference. In the dialog that appears, you type the following in the URL text box, replacing ServerDomainName
with the server name of your SQL Server instance:
http[s]://ServerDomainName/opensql?wsdl
Next, you click the green Go arrow button. You may be required to Windows-authenticate to the machine hosting the SQL web service. Be sure to use an account that has a matching SQL Server login. After you do ...
Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.