I want some of my ids to be colon-separated, which means that my URL paths have colons in them, e.g. /somethings/xyz:123
.
I have removed :
from requestPathInvalidCharacters
, but now I have another problem. It seems there are several third-party modules in the outside application that get PhysicalPath
or do MapPath
on all requests, which seems to have problem with colons:
[NotSupportedException: The given path's format is not supported.]
System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) +14633709
System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath) +351
System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +151
System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +38
System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path) +92
System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath) +107
How do I resolve it without rewriting all those modules?