Calling a custom web service which uses CrmService from within a plug-in.

Suppose we have a simple web service which uses CrmService to create contact records. Now we want to call this custom web service from within our plug-in.

On doing so, we might receive following errors

System.Net.WebException: The request failed with HTTP status 401: Unauthorized.

or

Microsoft.Crm.CrmException: No Microsoft Dynamics CRM user exists with the specified domain name and user ID

It could be because the credentials of the user are not getting passed from the plugin to the custom webservice.

Here we could the following

We can enable anonymous access and specify a valid CRM user’s credential there.

access

Bye..

 

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

3 thoughts on “Calling a custom web service which uses CrmService from within a plug-in.”

  1. Hi,

    I cannot write permanent user and password in IIS.
    I must call from Plug-in to my custom web services like CRM3.0
    If I understand correctly Microsoft blocked this option.

    Other idea?

    Rami Heleg

    Like

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s