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 Online Trial - Metadata contains a reference that cannot be resolved

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I'm facing the below error while connecting to the Org service of my Dynamics 365 Online Trial. I've gone through some of the solutions provided(e.g. updating to new SDK version etc), but none have helped, so posting this query here.

An exception of type 'System.InvalidOperationException' occurred in CRM Test Solution.dll but was not handled in user code
Metadata contains a reference that cannot be resolved: 'opsoftdec.api.crm8.dynamics.com/.../Organization.svc;sdkversion=8.2'.

The program '[2388] iisexpress.exe' has exited with code -1 (0xffffffff).

Following is my code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Xrm.Sdk;
using System.ServiceModel.Description;
using Microsoft.Xrm.Sdk.Client;
using System.Net;
using Microsoft.Xrm.Sdk.Query;

namespace CRM_Test_Solution
{
public partial class WebForm2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string _username = "username";
string _password = "password";
ClientCredentials credentials = new ClientCredentials();
credentials.UserName.UserName = _username;
credentials.UserName.Password = _password;
credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
Uri organisationUri = new Uri("opsoftdec.api.crm8.dynamics.com/.../Organization.svc");
Uri homeRealmUri = null;

OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(organisationUri, homeRealmUri, credentials, null);
IOrganizationService service = serviceProxy;

}
catch (Exception ex)
{
throw ex;
}
}

*This post is locked for comments

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans