TDS + Sitecore – Error – Illegal characters in the path

I am currently involved in a project that includes multiple TDS projects. All three of them can successfully establish a connection with my local server and pass the build test. Nevertheless, I am encountering an issue when attempting to synchronize with Sitecore for the TDS project that encompasses the templates. An error occurs during the synchronization process.

Exception Illegal characters in path. (ArgumentException):
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.Path.Combine(String path1, String path2)
   at HedgehogDevelopment.SitecoreProject.VSIP.Utils.SitecoreIconCache.GetIconPathForItem(SitecoreProjectNode project, SitecoreItemNode item, Boolean onlyUseCache)

Solution:

I encountered a similar issue, and it may be related to the settings within the <httpRuntime> element in the Web.config file.

Reference: https://stackoverflow.com/questions/1741560/net-problem-illegal-characters-in-path

Here’s what you can do:

  1. Navigate to the Web.config file and locate the <httpRuntime> node.
  2. Check if the “requestValidationMode” attribute is present. If it’s not, add the attribute with the value “2.0”.
<httpRuntime requestValidationMode="2.0" ...

3. Verify that the “validateRequest” attribute within the <pages> node is set to “false.”

<pages validateRequest="false">

4. If you intend to include specific characters in the path, you can add the “requestPathInvalidCharacters” attribute to the <httpRuntime> node, customizing it as needed.

<httpRuntime targetFramework="4.8" requestPathInvalidCharacters="&lt;,&gt;,*,%,&amp;,:,\,?"/>

Following these steps, you can potentially resolve the issue related to the synchronization process.

Deixe um comentário

Trending