• About Me
  • About this blog
  • Disclaimer

XRM Enterprise

Rami's blog dedicated to building enterprise scale XRM applications on the Power Platform

Build a Portal with a CRM 2011 backend

August 24, 2011 by Rami Mounla

In this tutorial, we’re going to build a web application with a Microsoft Dynamics CRM 2011 backend. The portal will be using the Microsoft MVC3 framework along with the Razor engine. For the fun of it, I’ll also include a Bing Map.
The Microsoft Dynamics CRM 2011 instance is hosted on the cloud. If you don’t have an account, feel free to register for a free 1 month trial http://crm.dynamics.com/

The entire solution can be downloaded from my shared SkyDrive TechEd2011 folder at My SkyDrive Link.

Step 0 – prerequisites

The solution was built in Visual Studio 2010. I have not tried it with Visual Studio 2010 express, and I am positive it will not work in the express version.
In order to run the solution, you’ll have to install the MVC3 framework (http://www.asp.net/mvc/mvc3) as well as the Silverlight tools for Visual Studio 2010 (http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=18149). Both of those packages are are availalble on my personal shared SkyDrive TechEd 2011 folder.

Optionally you can download the Dynamics CRM 2011 SDK http://www.microsoft.com/download/en/details.aspx?id=24004 (strongly recommended though). However the required DLLs are inclued in the solution.

Step 1 – preparing CRM 2011

The first step would be to prepare your CRM 2011 instance to include the customer regions entity.

Login to your CRM 2011 instance and navigate to Settings->Solutions and click on Import.

In the new window click on the browse button and browse to Regions_1_0_0_0.zip (available on my SkyDrive).

Click on the next buttons until the customisation is imported.

Once the import is done click on the publish all customisation button.

Step 2 Display the regions in your workplace

Once the customisation is imported go to Solutions->Regions. This step will help us display the region entity in our workplace.

Under the region solution select the region entity.

In the region entity click on the Workplace checkbox, then save and publish the entity.

Step 3 Import region records

This step is optional, but it would help you generate sample GIS data for New Zealand regions.

Under workplace->Extensions click on Regions and Import data -> Import Data (if you cannot see regions, refresh the screen using ctrl+f5).

Browse to Region.xml (also available on my SkyDrive folder) and click on the Next button.

On the next screen select the user who is going to own the records and click on submit.

Wait for a few minutes and the regions will be imported (You can click on the Imports link to follow the progress).

Step 4 Setting up the Portal in Visual Studio 2010

In this step we will setup the web.config file to know where your CRM 2011 instance lies in your Visual Studio 2010 solution.

Download the “MVC3 Visual Studio 2010 Sample solution – Final.zip” zip file from my SkyDrive folder. Unzip the solution and open the Microsoft.CRM2011Sample.MVC3.sln solution in Visual Studio.

In Visual Studio update web.config in the MVC 3 to contain the correct CRM information.

The ServerAddress is the same URL that you use to log in to CRM (omit the http).
The OrganisationName can be found by navigating to Setting -> Customizations -> Developer Resources “Organization Unique Name” in CRM.

For example if you are using a cloud instance of CRM 2011 the settings are as follows:

<add key=“ServerAddress” value=“<yourorg>.crm5.dynamics.com“/>
<add key=“OrganizationName” value=“<crmorganisationname>“/>
<add key=“SSL” value=“true“/>
<add key=“UseDefaultADCredentials” value=“false“/>
<add key=“Domain” value=“”/>
<add key=“UserName” value=“<liveid>@live.com“/>
<add key=“Password” value=“<password>“/>

Repeat this step for the web.config in the WCF project.

Finally in the BingMap project, update the MainPage.xaml to contain the correct CredentialsProvider (follow this article to obtain a Bing map token if you do not have one http://msdn.microsoft.com/en-us/library/cc980844.aspx).

Run the solution and enjoy the beauty of using CRM 2011 as a backend.

Trouble shooting

If you get an error stating could not load file or assembly ‘Microsoft.IdentityModel, Version=3.5.0.0…’

You need to download the windows identity foundation from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17331

I noticed that some people are having issues with my SkyDrive. If you have having any problems connecting, drop me a comment and I’ll send you an alternative link.

 

Rami Mounla
Posted in: Customisation, Integration, Microsoft Dynamics CRM, Microsoft Dynamics CRM 2011 Tagged: Bing Map, Integration, Microsoft Dynamics CRM 2011, MVC 3, Silverlight

About Me

Power Platform enthusiast with a bit of solution architecture on the side.

Recent Posts

  • Best 10 Power Platform Features – 2026 release Wave 1
  • Dataverse + Git Pull and Conflict Resolution
  • Native Dataverse Git Repository Integration
  • PAC CLI Cheat Sheet
  • Best 10 Dynamics 365 Features – 2024 release Wave 2

Archives

  • March 2026
  • November 2024
  • September 2024
  • July 2024
  • January 2024
  • July 2023
  • December 2022
  • August 2022
  • July 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • June 2021
  • April 2021
  • January 2021
  • October 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • August 2019
  • March 2019
  • September 2017
  • August 2017
  • October 2015
  • August 2015
  • June 2015
  • May 2015
  • March 2015
  • February 2015
  • January 2015
  • September 2013
  • August 2011
  • March 2011
  • March 2010

Tags

#MSBizAppsSummit #MsDyn365 #PCF #PowerApps #powerplatform AI Automated UI Testing Automation Bing Map CDS Client API Concurrency Control Concurrent Custom Controls Customer Engagement Data Access Dataflow Deployments DevOps Dynamics 365 Dynamics365 Dynamics CRM 2013 EasyRepro FastTrack JavaScript Microsoft Dynamic 365 Microsoft Dynamics 365 Microsoft Dynamics CRM 2011 Microsoft Dynamics CRM 2013 Microsoft Dynamics CRM 2015 MSDyn365 MVP ODATA Power Apps Power Platform Release Notes Release Plan REST SOAP TechTalk TeckTalk Tracing Unit Testing Wave 1 2020 Wave 1 2022

Categories

  • Automation
  • Conference
  • Configuration
  • Customisation
    • Client API
    • Integration
  • DevOps
    • Test Automation
    • UI Testing
  • Dynamics 365
  • Microsoft Dynamics 365
    • EasyRepro
    • Fast Track
  • Microsoft Dynamics CRM
    • Microsoft Dynamics CRM 2011
    • Microsoft Dynamics CRM 2013
    • Microsoft Dynamics CRM 2015
    • Microsoft Dynamics CRM 4.0
    • Settings
  • Power Platform
    • Canvas App
    • Ideas – GPT-3
    • Power Automate
    • TechTalks
  • Productivity
  • Wellington Dynamics User Group

Copyright © 2026 XRM Enterprise.

Omega WordPress Theme by ThemeHall