I have worked with a couple customers lately that would receive a script error when opening and navigating around Microsoft Dynamics CRM 2011. The first sign of the issue was an “Error on Page” message on the bottom left hand corner of the IE window. When they would attempt to browse to another area or close the form the following “Microsoft Dynamics CRM has encountered an error” message was thrown.



To see details of the script error you are able to click the link “View the data that will be sent to Microsoft” and the details will be displayed in another window.  For this specific issue the following script error report was provided stating that “The system cannot find the file specified”.

   <Message>The system cannot find the file specified.</Message>


After troubleshooting this issue we found that Microsoft Dynamics CRM 2011 is trying to write data to the Internet Explorer “UserData” folder which was missing in the users windows profile. If the folders are redirected before the user ever opens Internet Explorer the folder will not get pre-created. Once the profile is moved to the network share Internet Explorer is not able to create the folder any longer.  If the user has been in Internet Explorer prior to enabling folder redirection then the issue will not happen since the folder was pre-created.

We were also able to reproduce this issue outside of Microsoft Dynamics CRM 2011 by going to this URL and trying to save or load data. It will result in the same script error. http://samples.msdn.microsoft.com/workshop/samples/author/persistence/userData_1.htm

To resolve the issue the missing folder can be manually created in the users profile. Alternatively, a script such as the following could be executed to create this missing folder.

if not exist "%APPDATA%\Microsoft\Internet Explorer\UserData" md "%APPDATA%\Microsoft\Internet Explorer\UserData"

This type of script could be executed via the group policy to ensure the UserData folder exists for any new profiles that are created. Once the UserData folder is created Internet Explorer is able to write the necessary data.

Below is an example of the type of data you may find in the folder and subfolders.




If you are running into this issue or planning to deploy Microsoft Dynamics CRM 2011 in an environment with roaming profiles you will want to ensure this folder exists.  This could be a common scenario where Citrix is used to access Microsoft Dynamics CRM 2011.

The Internet Explorer team is investigating ways to prevent this from happening in the future, but for now this workaround can be used to prevent or resolve the issue.


Jeremy Morlock

Microsoft Premier Field Engineer