5 Replies - 298 Views - Last Post: 16 July 2012 - 09:47 PM Rate Topic: -----

#1 Jersey928  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 57
  • Joined: 22-March 11

Error Debugging WCF Service Library With CRM 4

Posted 03 July 2012 - 08:49 AM

i am building a WCF Service Library that has to check our CRM database. Unfortunately when i try to debug the service with the WCF Test Client i receive a "Failed to invoke the service" error. I have stripped down the service slowly adding things back in to help figure out what is causing the error. I found out that it is cause when i call a new instance of my CRM service object. Is there something that i need to do in order to fix this error and be able to step through the service to debug it??

Here is the code that is i am using to create the instance of the CRM service connection

 Public Function Crm_Service() As CrmService
        Dim token As New CrmAuthenticationToken
        token.AuthenticationType = 0
        token.OrganizationName = "CompanyName"
        Dim service As New CrmService()
        service.Url = "http://serverlocation/mscrmservices/2007/crmservice.asmx"
        service.CrmAuthenticationTokenValue = token
        Dim mycredentials As System.Net.ICredentials
        mycredentials = New NetworkCredential("username", "password")
        service.Credentials = mycredentials
        Return service
    End Function 



Any help would be much appreciated

Is This A Good Question/Topic? 0
  • +

Replies To: Error Debugging WCF Service Library With CRM 4

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 956
  • View blog
  • Posts: 3,676
  • Joined: 02-July 08

Re: Error Debugging WCF Service Library With CRM 4

Posted 03 July 2012 - 04:15 PM

I have not tried it yet, but I believe you have to start the service then use the 'Attach to Process' feature in VS. Have you done this?
Was This Post Helpful? 0
  • +
  • -

#3 Jersey928  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 57
  • Joined: 22-March 11

Re: Error Debugging WCF Service Library With CRM 4

Posted 04 July 2012 - 07:35 AM

no but i have read about that but i am unsure which process i have to attach.
Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 956
  • View blog
  • Posts: 3,676
  • Joined: 02-July 08

Re: Error Debugging WCF Service Library With CRM 4

Posted 04 July 2012 - 11:31 AM

Some more info here. I am researching this for myself for a future need. Don't know when I will get to it, but will post back when I do.
Was This Post Helpful? 0
  • +
  • -

#5 Jersey928  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 57
  • Joined: 22-March 11

Re: Error Debugging WCF Service Library With CRM 4

Posted 16 July 2012 - 10:05 AM

The problem with the link that you sent me is that it is for a Silverlight app and I am building a Desktop app
Was This Post Helpful? 0
  • +
  • -

#6 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 956
  • View blog
  • Posts: 3,676
  • Joined: 02-July 08

Re: Error Debugging WCF Service Library With CRM 4

Posted 16 July 2012 - 09:47 PM

I was hoping the example would be close enough to get the concept - I have not been able to try this myself yet.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1