0
votes

Desired Outcome: Expose my own Web Service in Dynamic CRM 4.0 (IFD), and accessible by external application

e.g.

CRM Web Server URL: https://Org.CrmServer.com/

CRM Web Service URL: https://Org.CrmServer.com/MSCRMServices/2007/CrmService.asmx

My own Web Service URL: https://Org.CrmServer.com/MyServices/Dummy.asmx

Problem Encountered:

  1. By accessing my Service URL in the browser, it redirects me to the sign in page. I entered a valid credential, and then it redirects me back to the Service Description page. So far so good

  2. In my external application (C#), I've added Web Service Reference, and tried to call my Web Service by

    MyService.Dummy d = new MyService.Dummy();

    string s = d.HelloWorld();

  3. The code above throws exception with error message (a HTML doc with "Object Moved" to CRM sign in page. (It's like what I see in the browser, redirecting to sign in page)

  4. Modified code to pass in the credential but still doesn't work

    MyService.Dummy d = new MyService.Dummy();

    d.Credentials = new System.Net.NetworkCredential("username", "password");

    string s = d.HelloWorld();

Questions:

  • Have I hosted my Web Service in the correct manner? If not, what's the correct way of doing it?

  • How to I consume my Web Service without being redirected to sign in page?

Thanks for the help.

1
Are you working in On-Premise or IFD?Luke Baulch
it's IFD, updating the question nowNeverever

1 Answers

0
votes

I've hosted web services inside the CRM Website. But to do this, I put them in the ISV folder. Therefore my service urls look something like

https://CrmServer.com/ISV/MyServices/Dummy.asmx

You could try doing it this way. I have assumed you are doing this on an IFD.