Posts Tagged ‘crm 2011 online’

Working with CRM 2011 online – Basics

Below are few things to ponder, when you are new to CRM and moving from “onpremise” to “online”.

Device registration

  • Its very important to get your device registered to connect to CRM online.
  • We need to specify the device credentials many places (for example, credentials are must when you use “crmsvcutil.exe” to generate wrapper class etc…)
  • We use “deviceregistration” tool which comes with SDK (sdk\tools\deviceregistration\bin\Debug\DeviceRegistration.exe) to generate device credentials
  • Open the command prompt and use the command “deviceregistration.exe /operation:Register” to generate the credentials
Device Registration

Device Registration

  • Once you generate the credentials, they get saved in a note file under C:\Users\username\LiveDeviceID
  • Also you can get the credentials by using, the command “deviceregistration.exe /operation:Show”

Registering Plugin

  • While connecting to your online organization using plug-in registration tool, provide
Connect CRM online using Plugin Reg tool

Connect CRM online using Plugin Reg tool

Using “crmsvcutil” with online

  • To generate an early bound class in CRM 2011 online using “crmsvcutil.exe”
    • Your device should be registered to connect to online CRM. Use the “Deviceregistration” tool register the device (Refer Device Registration section)
    • Open command prompt and point to “crmsvcutil.exe” tool which comes with SDK (sdk\bin\crmsvcutil.exe)
    • Provide the command to generate wrapper

CrmSvcUtil.exe /url: /username:user-wlid-email /password:user-wlid-pwd

/deviceid:user-defined-deviceid /devicepassword:user-defined-devicepwd” /out:”Xrm.cs” /namespace:Xrm

Fetch Based Reports

  • Connection string
    • To generate reports with CRM online, you have to provide connection string in below format
      • https://{Org_Name};{ Org_Name }
FetchXML Connection String

Fetch XML Connection String

System.InvalidOperationException while running Device Registration tool – CRM 2011 online


When I was trying to generate Device “ID” and “Password” using the command “deviceregistration.exe /operation:Register”, I got below error

Unhandled Exception: System.InvalidOperationException: There is an error in XML

document (5, 5). —> System.Security.Cryptography.CryptographicException: The parameter is incorrect

Reason :-

  • When you run the “deviceresistration.exe”, it creates new “LiveDevice.xml” file under “C:\Users\user_name\LiveDeviceID\” folder
  • Error occurs when the tool try to parse the generated “LiveDevice.xml” and show the Id & Password on console

Fix :-

  • Delete “LiveDevice.xml” file from ”C:\Users\user_name\LiveDeviceID” folder
  • Run the command “deviceregistration.exe /operation:Register”