locked
Accessing CrmDiscoveryService() issue RRS feed

  • Question

  •  

    Hi,

    We have deployed Microsoft Dynamics CRM 4.0 as On-Premise.

    we are tring to create an sample application for user authentication using the CRM webservices.

    We have created new windows application (Vb .NET) in VS2005, added the CRM webservice as "Web Reference"  (http://crmserver:5555/mscrmservices/2007/ad/crmdiscoveryservice.asmx?WSDL) and gave the name as "CrmSdk.Discovery"

    The problem is in Windows application when i include "Imports CrmSdk.Discovery" then try to create an instance of crmdiscoveryService Dim discoveryService As New CrmDiscoveryService(), we are getting the warning message as "Namespace or type specified in the Imports 'CrmSdk.Discovery' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases."

    but when we tried to create the instance as "Dim discoveryService As New CrmSdk.Discovery.CrmDiscoveryService()", it works fine.

    Can we know why it is not recongising the imports statement "Imports CrmSdk.Discovery"?

    Thanks,


    Sudhir C N
    • Edited by Sudhir C N Tuesday, September 7, 2010 9:23 AM changed heading
    Tuesday, September 7, 2010 9:18 AM

Answers

  • Please check that you've added "Imports.." statement between begin & end of the application's  Namespace block.

    otherwise

    You need to specify it including namespace for your application like :

    Imports yourApplicationName.CrmSdk.Discovery

    • Marked as answer by Sudhir C N Tuesday, September 7, 2010 10:36 AM
    Tuesday, September 7, 2010 9:44 AM

All replies

  • I believe in the SDK bin folder there is a discovery service wdsl - known problem trying to get from the web service

    Regards,

    Chris

    Tuesday, September 7, 2010 9:41 AM
  • Please check that you've added "Imports.." statement between begin & end of the application's  Namespace block.

    otherwise

    You need to specify it including namespace for your application like :

    Imports yourApplicationName.CrmSdk.Discovery

    • Marked as answer by Sudhir C N Tuesday, September 7, 2010 10:36 AM
    Tuesday, September 7, 2010 9:44 AM
  •  

    Thanks a lot.

    It is working by accessing ApplicationName.CrmSdk.Discovery. Is this form of accessing applicable to Webservices only?


    Sudhir C N
    Tuesday, September 7, 2010 10:15 AM