Hi,
I've been using the simplified connection of Microsoft.Xrm.Tooling.Connector.dll to connect a web app to D365. This works locally, but it doesn't work when is published to an Azure web app, IOrganizationService service is null.
Any step I'm missing of this not working in Azure?
CrmServiceClient conn = new Microsoft.Xrm.Tooling.Connector.CrmServiceClient(connectionString); // Cast the proxy client to the IOrganizationService interface. IOrganizationService service = (IOrganizationService)conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy; // Create the ServiceContext object that will generate // the IQueryable collections for LINQ calls. XrmServiceContext svcContext = new XrmServiceContext(service);
<add name="CRMOnline" connectionString="Url=https://l.crm4.dynamics.com; Username=crm@onmicrosoft.com; Password=HU; authtype=Office365" />
*This post is locked for comments
Hi
Looks correct.
would you please let me know the connection string, you are using.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156