Dynamics CRM 2011 Portal Development – Getting Started
Dynamics CRM 2011 Portal Development
Getting Started
1. Import solution from sdk\Solutions\PortalBase\MicrosoftXrmPortals_managed.zip. Detailed steps can be found Install the Base Portal Solution
The following navigation will be available in crm after import portal base solution
2. Create a new website, set the name of the website to “Hello World Portal”
3. create a new Content Snippet, set the name of the snippet to “HelloWorld“, value to “Hello World!!!”
4. Create a new empty web application in Visual Studio
5. Add reference to microsoft.xrm.client and microsoft.xrm.portal in sdk\bin\
6. Replace web.config with the following, change connectionString value
<?xml version="1.0"?> <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=http://win-b1dmdctdenr/ :5555/Cleanup;"/> </connectionStrings> <system.web> <compilation debug="true" targetFramework="4.0"> <expressionBuilders> <add expressionPrefix="Snippet" type="Microsoft.Xrm.Portal.Web.Compilation.SnippetExpressionBuilder, Microsoft.Xrm.Portal"/> </expressionBuilders> </compilation> </system.web> <microsoft.xrm.client> <contexts> <add name="Xrm" type="Microsoft.Xrm.Client.CrmOrganizationServiceContext, Microsoft.Xrm.Client"/> </contexts> </microsoft.xrm.client> <microsoft.xrm.portal> <portals> <add name="Hello World Portal"/> </portals> </microsoft.xrm.portal> </configuration>
7. Add HelloWorld.aspx to the project and set as start page
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HelloWorld.aspx.cs" Inherits="HelloWorldPortal.HelloWorld" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns="http://www.w3.org/1999/xhtml "> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <h1><asp:Literal runat="server" Text="<%$ Snippet: HelloWorld %>" /></h1> </div> </form> </body> </html>
8. Debug web application, check result.
This was originally posted here.
*This post is locked for comments