sitecoresitecore8.2

Error configuring web root of sitecore WDP package in local IIS instance


I am trying to configure my local sitecore instance in IIS using web deploy (WDP) packages provided by sitecore. To be more specific I am using content/website web root from Sitecore 8.2 rev. 161115 (WDP XP1 packages) . In WDC the data folder(App_Data) is now under the web root. Below is what I have tried so far -

(i) Copied web root from WDP XP1 (cm) package and placed in my IIS wwwroot. Configured the instance.

(ii) Replaced core, master, web, analytics, tracking connection string values from the my local SQL express and mongo values.

(iii) Replaced license.xml placed under App_Data folder with my subscribed license.xml file

(iv) Modified the data folder path as "/App_Data" in DataFolder.Config

https://www.screencast.com/t/sklpG0fJ1

When I try browsing the application now from IIS below is the error I receive - The directory name D:\home\site\wwwroot\App_Data is invalid.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: The directory name D:\home\site\wwwroot\App_Data is invalid.

I really do know from where the path " D:\home\site\wwwroot\App_Data" is coming from. Its not hard coded anywhere in my config files and all data folder path references are relative. Usually all my IIS sites resides in default C:\inetpub\wwwroot folder.

I understand that for Azure app services, the path "D:\home\site\wwwroot" acts as default but not really sure if it has anything to do with the local environment. Appreciate any ideas on where I shall focus to debug thus issue?

Thanks, Abhi


Solution

  • From the description it sounds like you renamed DataFolder.config.example to remove the .example extension and then modified this file with the corrected folder?

    The WDP zip also includes a zzDataFolder.config file which sets the dataFolder path to D:\home\site\wwwroot\App_Data.

    Sitecore loads configuration files alphabetically from the /App_Config/Include folder, and then traverses all child folders. I would suggest that you create a /App_Config/Include/z.Project and place all your custom config file in here to ensure that they are loaded last.

    I would suggest taking a read of this and this blog posts that I previously wrote on the subject for further understanding.