Partilhar via


CrmConnectionManager Class

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Provides Connection logic and error handling for connecting to CRM2011. This class is designed to operate in the background, off the primary user UI thread. This class raises events that can be used to update the user with progress reports.

Namespace:   Microsoft.Xrm.Tooling.CrmConnectControl
Assembly:  Microsoft.Xrm.Tooling.CrmConnectControl (in Microsoft.Xrm.Tooling.CrmConnectControl.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager

Syntax

public class CrmConnectionManager
Public Class CrmConnectionManager

Constructors

Name Description
System_CAPS_pubmethod CrmConnectionManager()

Default constructor.

Properties

Name Description
System_CAPS_pubproperty ClientId

System_CAPS_pubproperty ConnectedOrgFriendlyName

Returns the friendly name of the connected org.

System_CAPS_pubproperty ConnectedOrgId

System_CAPS_pubproperty ConnectedOrgPublishedEndpoints

Returns the endpoint collection for the connected org.

System_CAPS_pubproperty ConnectedOrgUniqueName

Returns the unique name for the org that has been connected.

System_CAPS_pubproperty CrmOnlineDiscoveryServerList

Collection of CRM Discovery Servers if a server list has not been submitted to this property, and get is called, a new instance of the CrmOnlineDiscoveryServers is created.

System_CAPS_pubproperty CrmOrgsFoundForUser

List of Organizations that have been requested by the user.

System_CAPS_pubproperty CrmSvc

CRM Connection Object.

System_CAPS_pubproperty ForceFirstOAuthPrompt

System_CAPS_pubproperty HomeRealmServersList

Collection of HomeRealms Loaded by Configuration

System_CAPS_pubproperty HostApplicatioNameOveride

Used in conjunction with the UseUserLocalDirecotryForConfigStore, Allows you to set a name for the config application to use. This is used when the host application cannot provide a proper AppDomain.Current.FriendlyName

System_CAPS_pubproperty LastError

last error from the connection manager

System_CAPS_pubproperty LastException

Last Exception from the connection manager.

System_CAPS_pubproperty ParentControl

This the parent control that invoked me.

System_CAPS_pubproperty ProfileName

Profile name to use for this login process.

System_CAPS_pubproperty RedirectUri

System_CAPS_pubproperty TokenCachePath

System_CAPS_pubproperty UserId

System_CAPS_pubproperty UseUserLocalDirectoryForConfigStore

Tells the system to store the user config in the users local app directory instead of the Exe directory.

Methods

Name Description
System_CAPS_pubmethod CancelConnectToServerCheck()

Cancel Connection process.

System_CAPS_pubmethod ConnectToServerCheck()

Begins the authentication process for CRM.

System_CAPS_pubmethod ConnectToServerCheck(CrmOrgByServer)

Begin Connect check to server

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

Clean up background worker on exit.(Overrides Object.Finalize().)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod LoadConfigFromFile(Boolean)

Loads the Configuration key's from file b/c some things are missing

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod RemoveUserLocalDirectoryConfigFile()

Will remove the user connection data settings from the users app config directory, useable only when the UseUserLocalDirectoryForConfigStore is set to true. this should be called after the connection has been established, or before the connect attempt in order to be effective.

System_CAPS_pubmethod RequireUserLogin()

This will check the configuration to determine if a user login is required. and if so, return true.

System_CAPS_pubmethod SaveConfigToFile(Dictionary<Dynamics_ConfigFileServerKeys, Object>)

Save the configuration Keys to the configuration file.

System_CAPS_pubmethod SetConfigKeyInformation(Dictionary<Dynamics_ConfigFileServerKeys, Object>)

Sets the current connection information for the server.

this can be used to pass in a preconfigured list of keys

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Events

Name Description
System_CAPS_pubevent ConnectionCheckComplete

Raised when the connection process completes

System_CAPS_pubevent ServerConnectionStatusUpdate

Raised when a status is updated

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Xrm.Tooling.CrmConnectControl Namespace

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright