简体   繁体   中英

Error occurred when verifying security for the message in CRM On-line

I'm moving out some of the code from a plugin to an external web application. The only thing that needs to be added is the authorization. When executing my QueryExpression instance from within the plugin, that's not an issue. However, accessing the date from outside is. :)

I'm not sure where to provide the credentials (user name and password) so the endpoint at my CRM organization lets me in.

I prefer to resolve it in such a way so I can create a web service reference and work towards it directly. So, the (kind of) requirement is not to go using and creating proxy.

How can I do that?!

Here's the very basic scenario I'd like to effectuate. I've created a web service reference in VS using the wizard (endpoint address is Organization.svc ).

QueryExpression request = new QueryExpression
{
  EntityName = "account",
  ColumnSet = new ColumnSet()
};

OrganizationServiceClient client = new OrganizationServiceClient();
IEnumerable<Entity> response = client.RetrieveMultiple(request).Entities;
int entityCount = response.Count();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM