次の方法で共有


Web Lead Import to CRM Online

I'm following up on an earlier posting on using the CRM Web Services to push data from your web site to the CRM Online application. In the previous post, I explained how to use the authentication, MSIDCRL.dll, to authenticate to the CRM Online.

This is the documented method in the SDK and works fine from a client machine but I had difficulty getting it to work in a web server environment. I had a few others email me with similar issues. After some asking around, I discovered this component is supported only on the client side. I assume this to mean that it might or might no work in a server environment ( running IIS ). It worked ok for me from Visual Studio.

After a bit of digging around, I got aid from sample code from one of our developers. I was able to get the authentication to CRM Online to work in a web application hosted on a shared environment with an external hosting company. yeah !!! So keep checking back for more demo code. I'll keep throwing stuff up.

To do the authentication, the code uses a soap call to WS-Trust web service to get ticket for WLID user (<msdn2.microsoft.com/en-us/library/bb447721.aspx>).

The steps are the same as the SDK documents with one exception of getting the Windows Live ID ticket.

1. Retrieve a policy from the CRM Online Discovery Web Service
2. Retrieve a Windows Live ID Ticket
3. Retrieve a CRM Online ticket using the Windows Live Ticket
4. Create and configure the CRM Online Service
5. Invoke the desired call.

*Big thanks to Andreas for passing the sample soap call.

I've posted my sample code on my Sky Drive. 


The code is as is and all that small print stuff. It's not official or currently part of the SDK.
I would expect this code to 'break' in the future so please refer to the SDK for a formal sample that is more stable.

Web Lead Sample

-cheers
Jon

Comments

  • Anonymous
    April 17, 2008
    I&#39;m following up on an earlier posting on using the CRM Web Services to push data from your web site

  • Anonymous
    May 01, 2008
    This is exactly what I have been waiting for.  No more unmanaged calls.  Thanks! Shan

  • Anonymous
    March 08, 2009
    The comment has been removed