Prepare for Portal Development
This topic begins with background information and best practices for portal development using Developer Extensions for Microsoft Dynamics CRM 2011 and the portal developer’s toolkit, and then walks through the installation and setup needed to begin.
In This Topic
Best Practices for Portal Development
The following is a set of guidelines that you should investigate to determine the right approach for your organization. Note that this list is by no means exhaustive but represents the bare minimum of what you should consider when deploying a web portal that connects to your Microsoft Dynamics CRM system.
| Deployment recommendation | Description and more information |
|---|---|
|
Deploy your portal under SSL |
It is imperative for organizations to be able to conduct private, tamper-proof communication with known parties. To ensure this, organizations should build a secure infrastructure based on public-key cryptography by using digital certificates with technologies such as Secure Sockets Layer (SSL). Useful References: |
|
Review your anti-phishing approach |
For any website that offers services that involve potentially sensitive customer and product data, your customers need to know that that they are interacting with your portal and not a phishing website. Before you set up any portal that connects to your Microsoft Dynamics CRM system, consider how your customers can identify your portal as authentic. For more information about phishing, see http://en.wikipedia.org/wiki/Phishing. |
|
Privacy recommendations |
For any portal services you develop that work with Microsoft Dynamics CRM and that access, collect, or disclose information about you, your customers, your employees, or your computer over the Internet, you should implement a consent capture mechanism and make available a clear and conspicuous notice regarding the uses of information recorded and exchanged through the portal. Microsoft provides a number of guides on Internet Security and Privacy practices. You are strongly urged to review these resources before deploying any Internet portal that integrates with your Microsoft Dynamics CRM system. For more information, seeInternet Security and Privacy.
|
|
Restrict the use of the portal integration account |
When you set up the portal you nominate an account that will be used by the portal to connect to Microsoft Dynamics CRM and perform create, read, update, and delete transactions. It is vital that this account is used solely for this purpose. Do not use the account for other Microsoft Dynamics CRM system uses and make sure that if you are using a Microsoft account that this account is not used for any other websites or applications. When you set up the Microsoft Dynamics CRM account, ensure that you assign it a security role that only performs the functions exposed by the portal. For example, if your portal reads campaign information and writes campaign responses, ensure that the Microsoft Dynamics CRM account used for this purpose only has those privileges. This helps minimize the potential damage if this account is compromised. It is important that you do not, under any circumstances, set the account up with System Administrator privileges. |
Install the Base Portal Solution
To begin you must install the base portal solution into your instance of Microsoft Dynamics CRM.
Import the customizations file
-
Ensure that Pop-up Blocker does not cause errors during the import process. In Internet Explorer either turn off Pop-up Blocker (go to Tools -> Pop-up Blocker -> Turn Off Pop-up Blocker) or add your Microsoft Dynamics CRM site to allowed sites (go to Tools -> Pop-up Blocker -> Pop-up Blocker Settings).
-
Go into Settings -> Solutions -> Import
-
Select the solution package
sdk\Solutions\PortalBase\MicrosoftXrmPortals_managed.zipand review the package details. -
Select the check box to enable post import actions.
-
While still under Settings -> Solutions, click Publish All Customizations.
-
After the import process is completed, refresh your browser. For more information on the entities installed with this solution, see Manage Portal Content.
Generate Early Bound Types
To prepare for developing a web portal, you must first use the code generation tool with the Microsoft.Xrm.Client.CodeGeneration extension. For more information, see CrmSvcUtil.exe Extension Usage and Command-Line Parameters. In addition, read Best Practices for Portal Development.
The following examples use the CrmSvcUtil.exe tool, with the Microsoft.Xrm.Client.CodeGeneration extension to generate the classes in the Xrm namespace and XrmServiceContext is specified as the service context name. Note that Microsoft.Xrm.Client.CodeGeneration.dll must be in the same directory as CrmSvcUtil.exe, or in the system GAC, when you run this command.
CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:Xrm\Xrm.cs /url:http://Crm/Contoso/XRMServices/2011/Organization.svc /domain:CONTOSO /username:administrator /password:pass@word1 /namespace:Xrm /serviceContextName:XrmServiceContext /serviceContextPrefix:Xrm
Your portal will need the following minimum required configuration.
<configuration> <configSections> <section name="microsoft.xrm.client" type="Microsoft.Xrm.Client.Configuration.CrmSection, Microsoft.Xrm.Client"/> <section name="microsoft.xrm.portal" type="Microsoft.Xrm.Portal.Configuration.PortalCrmSection, Microsoft.Xrm.Portal"/> </configSections> <connectionStrings> <add name="Xrm" connectionString="ServiceUri=...; Domain=...; Username=...; Password=..."/> </connectionStrings> <microsoft.xrm.client> <contexts> <add name="Xrm" type="Xrm.XrmServiceContext, Xrm"/> </contexts> </microsoft.xrm.client> <microsoft.xrm.portal> <portals> <add name="My Portal"/> </portals> </microsoft.xrm.portal> <location path="Services/Cms.svc"> <system.web> <authorization> <allow roles="My Portal Administrators"/> <deny users="*"/> </authorization> </system.web> </location> </configuration>
See Also
Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2012 Microsoft Corporation. All rights reserved.