Azure Portal fails

May 13, 2010 at 4:34 AM
Edited May 13, 2010 at 4:34 AM

Followed the instuctions in setting up the portal on Azure.  No issues when running debug on the project.  Set connection string to use registered live id account.  Portal not working even though it says ready...

Website copy utility also fails to load xml into CRM online system.  and Under Settings, you can not view the organisation ID either...

May 14, 2010 at 6:40 PM

There are many possible reasons that this could fail.  It looks like you have a number of issues, so let's tackle those in the appropriate order.

For the portal to work, it has to be able to connect to a CRM database.  When you promote to Windows Azure, this database is likely going to be CRM Online, or possibly your on-prem or partner-hosted CRM using IFD.  I will assume that you are using CRM Online, otherwise you would have had more problems trying to debug your site on your workstation using your IFD settings.  You mentioned that the websitecopy utility failed to load the xml into CRM Online.  If that is the case, there is no way that your portal could work in debug mode as the portal requires the content in order to function.  If you have your project pointing at an on-prem deployment of CRM, please note that it will work in the Azure debug fabric but will fail when promoted to Windows Azure because Azure cannot talk to your CRM.  (side bar:  Until Project Sydney that is...). 

I have been able to use the websitecopy utility to import the customerportal.xml file.  First off, I ensured that the CRM schema was imported and that I could see the content management tab in the main CRM console.  I used the url from my CRM browser window plus the unique orgname

C:\sdk\microsoft.xrm\tools\websitecopy /sourcefile:"C:\CUSTOMER_PORTAL_RTW_R1\Installation\Customizations\customerportal.xml" /targetconnectionstring:"Authentication Type=Passport; Server=https://{orgname}{uniqueorgname}; User ID={my live id username}; Password={my live id password}; Device ID={a unique device id - make one up}; Device Password={unique device password - make one up}" /targetWebsiteName:test

Make sure to substitute all of the {...} parameters with your own settings (the braces are to be removed/replaced as well).

Once you get your content into CRM Online, you should be able to debug your local project.  In this case, your local project will be working on your workstation but communicating with CRM Online.  Once that is working, you can then promote to Azure.

There are some caveats with using Azure.  The biggest one for CRM is that if you have the CRM Outlook client installed on your workstation, the microsoft.crm.sdk.dll and typeproxy dll files are installed in your workstation GAC.  Visual Studio will detect if a project reference is installed in your GAC, and if it does, it sets the project reference to copylocal=false.  That is not desirable if you are going to deploy to Azure because Azure does not have these files in the GAC, and the end result is that the files will not be deployed to Azure and the site will fail.  To work around this, simply locate the assemblies in your project references and set copylocal=true for all of the references (3 of them).

Good luck!

Shan McArthur

May 15, 2010 at 10:14 PM

Azure Portal fails.

Same issue.  Followed the instuctions in setting up the portal,step by step. No issues. I can run the portal "locally ; debug mode. "Websitecopy" without errors, everything works fine.

But nothing happends when I deploy to Azure. (green "button" aswell).  (staging one)

The Azure service(account is right , because I can deploy a "hello world" project without trouble.....



May 16, 2010 at 1:04 AM

One more caveat to Azure - the CRM SDK DLLs aren't specifically marked safe for partial trust environments, so you have to allow Azure to run assemblies that require full trust.  This can be done by using the enableNativeCodeExecution="true" attribute in your ServiceDefinition.csdef file on the WebRole note.

The website is using the SDK and running in Windows Azure.

Shan McArthur

May 16, 2010 at 8:11 PM

No luck for my deploymet.  Enable that seting, but still not working.

<?xml version="1.0"?><ServiceConfiguration serviceName="CloudServiceCRM" xmlns="">
<Role name="Customer-Portal-R2">
    <Instances count="1" />  
 <Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true" />    
 <Setting name="enableNativeCodeExecution" value="=true" />  




May 18, 2010 at 5:52 PM

Wrong file - that is your .cscfg file - you need to look at your .cscsdef file.


<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="AzureDeployment" xmlns="">
  <WebRole name="XrmContest" enableNativeCodeExecution="true">
      <InputEndpoint name="HttpIn" protocol="http" port="80" />
      <InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="" />
      <Setting name="DiagnosticsConnectionString" />
      <Certificate name="" storeLocation="LocalMachine" storeName="My" />

May 18, 2010 at 8:28 PM luck with the right file:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="CloudServiceCRM" xmlns="">
  <WebRole name="Customer-Portal-R2" enableNativeCodeExecution="true">
      <InputEndpoint name="HttpIn" protocol="http" port="8080" />
      <Setting name="DiagnosticsConnectionString" />
      <Setting name="enableNativeCodeExecution" />

Thanks thanks in advance

May 18, 2010 at 8:34 PM
That has covered all of the common things that you might encounter. When I have encountered issues with Windows Azure where the website doesn't respond, I have found that logging a service request with the Azure team is quite effective. They have access to some logs that can point to the underlying error conditions. I can also assist you via Live Meeting if you like. Simply email me at shan underscore mcarthur at Shan McArthur
Jul 5, 2010 at 10:21 AM

Am trying to install the Customer Postal on Azure and link it to a Hosted CRM.

The portal appears to be installed on Azure correctly (as far as i understand obviously), however when linking to http://<AZURE GUID> or the published WebSite URL i get a blank page.

Any help would be great.






Jul 5, 2010 at 3:13 PM

You should not get a blank page.  Perhaps Azure had not started your website properly?

You should review the view that Reuben put together about how to deploy on Azure.  It is in the PRM accelerator folder, but it is the exact same steps for this portal.  This has been well-tested in Windows Azure.


Jul 6, 2010 at 1:23 PM
Edited Jul 6, 2010 at 2:40 PM

thanks for the link and am working it through it.

CRM is Hosted.

my settings via web.config

<add name="Xrm" connectionString="Authentication Type=AD; Server=https://<orgname><orgname>; User ID=xxxxx; Password=yyyyy"/>
<add name="Live" connectionString="Application Id=00000000xxxxxxxx; Secret=the secret"/>

and this is the error that i'm getting when debugging the application on my local machine. Is it a problem if i've already added the reference in Step 23 "Add in a new Windows Azure Cloud Service project"?

** just incase it is a problem to have added the "Windows Azure Cloud Service project" prior to running the project, i have started again. The new project also errors in the same way as noted below **

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Index was outside the bounds of the array.
Source Error:

Line 53:   <roleManager enabled="true" defaultProvider="CrmRoleProvider">
Line 54:    <providers>
Line 55:     <add name="CrmRoleProvider" type="Microsoft.Xrm.Portal.Web.Security.CrmContactRoleProvider"/>
Line 56:    </providers>
Line 57:   </roleManager>

Jul 6, 2010 at 3:02 PM

This looks like an error connecting to CRM.  From your description, you say you are using 'hosted' CRM, which means SPLA authentication to me.  The url in your connection string also looks like it is hosted.  That said, your connection string is using Authentication Type=AD, which will not work for an IFD authentication.  You should change your Authentication Type to SPLA.


Jul 6, 2010 at 4:26 PM
Edited Jul 6, 2010 at 4:29 PM

Thanks very much, have changed to SPLA and tested within Dev environment: now able to view the Customer Portal.

- i referenced the Customer Portal Deployment Guide_Azure_V1.0.docx section 21.c i thought that it related to my configuration requirement.

I've now uploaded The Customer Portal into Azure as 'Production' and waited until the status is defined as 'Ready' and when clicking on the link supplied in Azure i'm taken to a page with the message/ error 'Internet Explorer cannot display the webpage'.



Jul 6, 2010 at 4:47 PM

Is your Azure site in the "ready" state?  Sometimes it takes a while for Azure to spin up.  Other things can also go wrong with the Azure deployment as well.  For example, if you have the CRM outlook client running on your workstation, the CRM SDK dlls are installed in your GAC, and Visual Studio will detect this and decide that you don't want the DLLs included in your bin folder, and when you promote to Azure, the DLLs will be missing.  One thing you should do is to ensure that Copy Local=true for all reference DLLs in your project.  Also review the Azure build log to ensure that you have no warnings.


Jul 6, 2010 at 11:38 PM
Edited Jul 7, 2010 at 12:08 AM

yes, the Azure site is displayed in the ready state.

ok, well some sort of progress :-)...

within the servicedefinition.csdef i noted that ( which is not how Reuben has his configured in his Partner portal video )

<InputEndpoint name="HttpIn" protocol="http" port="8080"/>

So ( I am not sure if this information is of any use or not )

1. i added port 8080 to the url and i was able to view the partner portal.

2. amended the port setting within the servicedefinition to be 80: and no website. Obviously LiveID also has the Return Url set not as 8080.

Am not sure if this port issue is a possible clue to the problem or not.

In response to you questions/ checks....

My machine is not a development machine for any other tasks ( i use VPCs ) other than trying to get the portals working.

With the exception of the References that are "System.xxxx", all dll's are set to CopyLocal=true .

When you refer to "Azure Build Log" are you referring to the output from within Visual Studio as the build is created or some logging information from within Azure? If so then no errors were reported.



Jul 7, 2010 at 12:48 AM

The port 8080 is likely going to cause some issues, especially with Live ID.  How did that get set?  I would recommend that everything go over standard ports (port 80 for http).  Other than that, the portal should just work out of the box, as long as it can connect to CRM.  I am out of office this week and at WPC next week.  I would normally volunteer to help you with Live Meeting, but I doubt you want to wait 2 weeks.  Perhaps you can send me some technical details via email (click my name and send me a private message) and I will see if I can determine what the problem is.