Developer forum

Forum » Development » "Illegal characters in path" in eCom admin

"Illegal characters in path" in eCom admin

Aki Ruuskanen
Aki Ruuskanen
Reply

I have a bit of a strange problem in eCom in admin. 

When I try to expand a shop in admin with a specific user I get an "Illegal characters in path"-error. With the built in administror account this does not occur. 

I understand that it has to do something with the data but I don't understand what could be different when using to different users. There are not any specific permissions in that shop.

The stack trace: 

[ArgumentException: Illegal characters in path.]
   System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) +14519809
   System.IO.Path.GetFullPathInternal(String path) +132
   System.IO.FileInfo.Init(String fileName, Boolean checkHost) +33
   Dynamicweb.Ecommerce.UserPermissions.UserPermission.RefreshXmlCache(String userPermissionType, String userPermissionTypeId) +1357
   Dynamicweb.Ecommerce.UserPermissions.UserPermission.LoadPermissions() +245
   Dynamicweb.Ecommerce.UserPermissions.EcommercePermissionHelper.GetPermission(IPermissionControlled permissionObject, User user, Boolean checkNoPermissions) +200
   Dynamicweb.Ecommerce.UserPermissions.EcommercePermissionHelper.HasAccess(IPermissionControlled permissionObject) +171
   Dynamicweb.Ecommerce.Products.GroupDeleting.IsTreeGranted(String groupId, Dictionary`2 alreadySeen, Boolean checkAdmin) +160
   Dynamicweb.Ecommerce.Products.GroupDeleting.IsTreeGranted(String groupId, Dictionary`2 alreadySeen, Boolean checkAdmin) +283
   Dynamicweb.Ecommerce.Products.GroupDeleting.IsTreeGranted(String groupId, Dictionary`2 alreadySeen, Boolean checkAdmin) +283
   Dynamicweb.Ecommerce.Products.GroupDeleting.IsTreeGranted(String groupId, Dictionary`2 alreadySeen, Boolean checkAdmin) +283
   Dynamicweb.Ecommerce.Products.GroupDeleting.IsTreeGranted(Group group) +61
   Dynamicweb.Admin.eComBackend.MainMaster.GetGroupNodes(eComTreeNode parent) +644
   Dynamicweb.Admin.eComBackend.MainMaster.GetNodes(eComTreeNode parent, eComTreeNodeType t) +191
   Dynamicweb.Admin.eComBackend.MainMaster.MainTree_NodeExpand(Object sender, TreeNodeExpandedEventArgs e) +160
   Dynamicweb.Controls.Tree.RaisePostBackEvent(String eventArgument) +726
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5028

 

Regards / Aki

 


Replies

 
Nicolai Pedersen
Reply

Hi Aki

In the root of /Files/Cache.net you might have some *.permissions.xml files. Please delete these and see if that helps.

BR Nicolai

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi Nicolai,

There were a bunch of *.permission.xml filers. Deleted them and logged in again. Unfortunately with the same result. 

Regards / Aki

 

 

 
Nicolai Pedersen
Reply

Try deleting all records from [EcomUserPermission] and [EcomUserPermissionType], delete the files from before and iisreset.

And also check your groupids - that you do not have ids like "--select<>###ยค@$...." and crap like that...

BR Nicolai

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

I found groupsids containing '>' and '<'. Could that screw up eCommerce in admin? 

Works in frontend:

https://nevotexproduktai.lt/lt-lt/produktai/irankiai-ir-priemones/irankiai-zirkles-adatos-ir-kita/zirkles-peiliai-priedai/zirkles-20-cm-ir-ilgesnes

 

Regards / Aki

 

 

 

 
Nicolai Pedersen
Reply

They probably could as they are HTML characters that could fuck up a lot of things...

Wonder how those ids was generated!

 
Aki Ruuskanen
Aki Ruuskanen
Reply

They come from the ERP system. Gonna assume that they are the problem and add some cleaning to the integration. 

Thanks for your help. 

Regards / Aki

 

 
Aki Ruuskanen
Aki Ruuskanen
Reply

I tried to delete the tables and files you mentioned and did a iis reset. The error is still there so we are adding some cleaning to the groupimport. 

But I'm curious why it works when you are logged in as "administrator" but not wen logged in as an other user that as administor persmissions?

Regards / Aki

 

 
Nicolai Pedersen
Reply

Hi Aki

You can try to enable the new permissions - that will disable all of that old code that uses the XML files. https://doc.dynamicweb.com/documentation-9/users/user-management/permissions

BR Nicolai

 
Aki Ruuskanen
Aki Ruuskanen
Reply

Thanks. That is propably a good thing to do for a lot of reasons. smiley

 

You must be logged in to post in the forum