Thursday, July 1, 2010

Error loading form in IE6 - "An Error has occured. Try this action again" / "An Error has happened getting the date"

Recently I noticed an issue with viewing some forms using Internet Explorer 6. Here's the senario:

You try to open an entity with a large number of attributes (often multiple date fields). But the form partially loads with the note in the status bar "X items remaining".
At this point IE is not responfing and the only option is to wait or End Task in the Task Manager.

After a long wait, the form finally loads. But with Errors:

You may also get various other errors.
Solution:

This error is probably related to the maximum number of concurrent TCP connections that Internet Explorer 6 can open. By default IE 6 only allows maximum of two TCP connections. If the browser tries to open a third, it freezes and waits for another connection to become available. This is particularly seen on a web page with several http AJAX type calls to the server. Various CRM 4.0 components such as the date/time field use AJAX to retrieve data.
This problem has been resolved in IE 8.0 onwards. But you can increase the TCP connections in a browse using a registry setting that’s often used to improve and speed up IE’s performance.

Open RegeditNavigate to [HKEY_CURRRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

Add a new DWORD
MaxConnectionsPer1_0Server
Enter a decimal value for the new Key of at least 8

Add another new DWORD
MaxConnectionsPerServer
Enter a decimal value for the new Key of at least 8


More details on setting this registry key: http://www.windowsreference.com/internet-explorer/speed-up-internet-explorer-by-tweaking-maximum-connections/

Error Importing Organization in CRM 4.0:

Error: Import Organization (Name=, Id=) failed with Exception:System.Data.SqlClient.SqlException: The transaction log for database 'XXXX_MSCRM' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases

This error suggestes that the database transaction log has grown beyond maximum size or disk is full. The odds are that you have a fairly large database reaching a few GB. There are 2 possible solutions here...

Solutions 1
Since importing an Organization in CRM 4.0 will involve a lot of work, the transaction log occasionally tends to become unmanageably large. First try to lower the log size.

In the database properties screen set "Recovery Mode" to simple:

Now remember to change this setting back to "Full". This is only dependant on your system's recovery strategy.

If you don't have at least Update Rollup 8 installed then it may be time to do so now. This provides a new and improved Organization Import functionality as described here (http://support.microsoft.com/kb/977867). Remember that you would still need to add and set the new registry key "OptimizeOrgImport" manually.