Reputation: 27659
I am trying to access crm 2011 org like:
using (OrganizationService service = new OrganizationService("CrmConnection"))
{
}
The connectionString looks like:
<connectionStrings>
<add name="CrmConnection" connectionString="Server=https://OurDomainName.OurDomainName.com;Username=TheUser;Password=ThePass" />
</connectionStrings>
When I run the code it throws below error:
There was no endpoint listening at
http://adfslogin.OurDomainName.com/adfs/services/trust/13/username
that could accept the message. This is often caused by an incorrect address or SOAP action.
Please note that I can access the URL in IE using the same credentials as specified in the web.config.
Can someone point out what I am missing which is causing the issue?
Upvotes: 1
Views: 1464
Reputation: 1
I know this is ancient but it took me some time to figure it out and none of the answers worked in my case. It turned out the message can be a red herring and there's nothing wrong with the AD FS setup.
What worked for me is to pass the credentials in a different format: If, for example, you're using username: DOMAIN\username password: PasSWorD, change it to use domain: DOMAIN username: username password: PassWorD.
I was using ClientCredentials.Username
but ended up using ClientCredentials.Windows.ClientCredential
instead.
Here's the article that helped me figure it out: CRM & ADFS woes
Upvotes: 0
Reputation: 4781
Please refer to this: http://www.powerobjects.com/blog/2014/04/22/error-adfsifd-url-dynamics-crm/
It doesn't always work, but in most cases it does. The idea is to make sure you do enough iisresets and reconfigurations as possible and in different orders just to make sure you get the right one.
The steps described in the article are good, but for some reason CRM doesn't always listen to the commands you give it.
Another way to handle this is to disable the username endpoint that is causing the issue (the one with WS-Trust 1.3). This worked in one of my cases, while the first solution worked in others.
For the second solution refer to this MS KB: http://support2.microsoft.com/kb/2912175
Upvotes: 1