How to: Add the CrmService Web Reference: CRM Online
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
To obtain the Web reference for Microsoft Dynamics CRM Online you must first save a copy of the Web Services Description Language (WSDL) file to your development computer. Notice that the WSDL file changes as you customize the entities for your organization. When this happens you can save a new WSDL file and then update the Web reference in your project.
Open a Web browser and enter the URL for Microsoft Dynamics CRM Online. For example:
Select CRM Online Login and sign in using your Windows Live ID account.
In the Navigation pane, click Settings.
In the Settings pane, click Customization.
In the Customization area, click Download Web Service description files.
Click the CrmService.asmx icon.
When the Web browser opens, save the WSDL as an XML file, for example CrmServiceWsdl.xml, to any local folder on your computer or to your Visual Studio project folder. The procedure for saving the file will be different depending on the Web browser you are using. In Internet Explorer 7, click the Page menu, and then click Save As.
Close the Web browser window that contains the WSDL definition.
Open your Visual C# or Visual Basic .NET project in Microsoft Visual Studio.
In Solution Explorer, right-click your project name and choose Add Web Reference if you are using Visual Studio 2005. For Visual Studio 2008, choose Add Service Reference, click Advanced, and then click Add Web Reference.
In the Add Web Reference wizard, type the URL for the CrmService WSDL XML file that you previously downloaded into the URL box, and then click Go. For example:
file://C:\Documents and Settings\user\My Documents\Visual Studio 2005\Projects\PassportAuth\CrmServiceWsdl.xml
When the CrmService Web service is found, change the text in the Web reference name box to CrmSdk and then click Add Reference.
The Microsoft Dynamics CRM Web service is now added to your project. In your source code you can refer to the classes available in this SDK.