web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics 365 Connection Strings

(0) ShareShare
ReportReport
Posted on by 227

Hello, I am trying to do a sample connection string, which worked when we were on dynamics crm 2015, but now that we are on 365 I am getting an error.  Below is my Connection string that is failing, along with the error (I have used XXXX in place of my personal information, but it is there in my actual code).

<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
<dependentAssembly>

<assemblyIdentity name="Microsoft.Xrm.Sdk" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="1.0.0.0-8.0.0.0" newVersion="7.0.0.0" />

</dependentAssembly>
<connectionStrings>
<!-- Online using Office 365 -->
<add name="CRMOnline" connectionString="Url=https://XXXXX.crm.dynamics.com; Username=XXXXXXXX; Password=XXXXXXXX; authtype=Office365"/>

</connectionStrings>
</configuration>

ERROR

Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    remove these lines

    <assemblyIdentity name="Microsoft.Xrm.Sdk" publicKeyToken="31bf3856ad364e35" culture="neutral" />

    <bindingRedirect oldVersion="1.0.0.0-8.0.0.0" newVersion="7.0.0.0" />

    and make sure you are using the latest nuget packages

  • lispyj Profile Picture
    181 on at

    I would like a connection string xml to use to connect MSAccess 2016  to Dynamics 365.  I followed this article to create the connection string below, but it fails with the error:

    "The root element of a valid Metadata package must be 'Model' in namespace 'schemas.microsoft.com/.../BusinessDataCatalog'. The root in the given package is 'configuration' in namespace."

    Do you know why the connection string below won't work?

    <?xml version="1.0"?>

    <configuration>

    <startup>

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>

    </startup>

    <dependentAssembly>

    </dependentAssembly>

    <connectionStrings>

    <!-- Online using Office 365 -->

    <add name="CRMOnline" connectionString="Url=[View:https://XXXXXX.crm.dynamics.com:750:50]; Username=XXXX; Password=XXXX; authtype=Office365"/>

    </connectionStrings>

    </configuration>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans