Share via


CRM 2013 : Microsoft.Crm.SharedSetup.SetupException: The XML in the configuration file is not valid.

After testing our CRM 2013 installation scripts on our own environments, we decided to deploy them on the customer's environment. As we were to expect a standard windows environment with IIS installed, we used the scripts we tested on identical environments. When we ran our scripts, we experienced the following error:

Microsoft.Crm.SharedSetup.SetupException: The XML in the configuration file is not valid. Location: F:\InstallConfigWebFrontEnd1.xml. Please fix the configuration file, and then try again. --->
System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at Microsoft.Crm.Setup.Server.ConfigurationParser.ParseWebsiteSettings(XmlNode element)

As the error message states, one would check the XML file in every way to see if we did not mess up anything. In the end, we did not find anything wrong with it. What did give us a hint though, is the following part of the stacktrace:

at Microsoft.Crm.Setup.Server.ConfigurationParser.ParseWebsiteSettings(XmlNode element)

This means that something is going wrong once the setup tries to set the website from the following XML tag:

<WebsiteUrl Create="false">Default Web Site</WebsiteUrl>

After checking every possible option with the tags, we checked the IIS. For some reason IIS was missing it's default web site, therefor it could not use the Default Web Site during setup. Changing the script to

<WebsteUrl Create="true" port=80>Default Web Site</WebSiteUrl>

made setup run fine.