Tuesday, October 13, 2009

Last week I had 401.5 error when browsing CRM4 on IIS7 using a host header and was very lucky to have our internet network adminstrator Zubair to resolve this issue for me. Basically, this is what he did.

1.) We checked the spn (use Windows Support Tool) and the service account was associated with all the host headers correctly. Checked CRM website NTAuthenticationProviders (use IISMetaBaseExplorer) and it was setup correctly. Then use Microsoft Network Monitor 3.3 to monitor http traffic from the client and filtered for kerberosv5 error, found KRB_ERR_RESPONSE_TOO_BIG(52). Follow http://support.microsoft.com/kb/244474/en-us and added MaxPacketSize attempt to resolve the issue, did not help

2) Added BackConnectionHostNames regkey as per http://support.microsoft.com/kb/926642 , able to browse crm using host header mscrm from crm server itself. Still having 401.5 error when browsing host header from LAN.

3) Removed and re-added setspn -A http://mscrm crmserver_name

4) Forced Windows Authentication using NTLM by the following 2 cmd line
appcmd set congif /section:windowsAuthentication /enabled:true
appcmd set config /sectionLwindowsAuthentication /-providers.[value='Negotiate']

Finally got around the 401.5 error! Very happy now. What a great start of a week!

Wednesday, October 7, 2009

CRM4 Installation error parsing config file

Installed Microsoft Dynamic CRM4 (64bit) on Windows Server 2008, IIS7, SQL 2005, SSRS2008, ISA2006 environment with IFD enabled using a config file last week and experienced a few errors:

1. Error parsing config file - The config file was very simple. I pretty much just copied and pasted the parameters from the implementation guide. Found out to be the actual copy and paste caused the problem. When copy and past from Microsoft Word document to notepad, it did not translate the " properly. Replaced all the funny " from the config.xml file, re-ran the installation, this error did not pop up again.

2. Error Active Directory groups and an organisational unit cannot be specified in the configuration file - found out to be I don't need to use the Active Directory group parameter if the security groups are pre-created. Removed the parameter referencing to the Active Directory groups resolved this problem.

3. Followed every word on KB950100 and avoided 7 potential errors listed on the article.

4. After the installation, had a blank crm web.config file. Backed up the web.config, copied from another web.config from the CRM4 Demo VPC and it worked.

5. IIS error 401.5 when browsing CRM using a host header. Still troubleshooting this issue. Confirmed it is not related to NTAuthenticationProviders, setspns. Performed a Network Monitor trace, found to be Response Too Big for UDP. Will let you know later when this is resolved.

Wednesday, September 9, 2009

Export to excel only showing 10 000 records

Microsoft Dynamic CRM allows user to export data to excel and perform further data analysis from there. If you have attempted to export more than 10000 records from Dynamic CRM 4, you will find excel will only show the first 10000 records. At first, you may think there is a limit with Excel. Then you will find out Excel 2003 has a limit of 65535 rows or Excel 2007 has a limit of 1048576 rows. The 10000 record limit is actually set by CRM4. Referring to the SQL database, you will find a column MaxRecordsForExportToExcel in the OrganisationBase table. The value for the column is 10000. Even if you can modify this value and solve the issue immediately, modifing data directly from SQL database is not supported by Microsoft CRM. Here is a supported work around and can be done at a standard CRM user level (assuming you have sufficent previllege over the data).



1) Select the view list you want to export. For example: Active Contacts.

2) Click Excel from the list toolbar and select Dynamic Worksheet option

3) Open the excel workbook and enable Data Connection if required

4) On the excel workbook, right click the data area, select Edit Query

5) If there is a pop-up windows about "The query cannot be edited by the Query Wizard", click ok. Now you will see the Microsoft Query window.

6) From the Microsoft Query toolbar, click View and select SQL. A new pop-up Windows showing the actual SQL statement appears.

7) Remove Top 10000 from the SQL statement and click OK to exit the SQL statement window

8) From the Microsoft Query window toolbar, click File and select Return Data to Microsoft Office Excel

9) Refresh your excel worksheet if auto-refresh is not enabled and you should see all data from the select CRM view now