Basic question about commandbox server aliases - i...
# box-products
d
Basic question about commandbox server aliases - is the only way to set an alias to a network location is to map a drive letter to that network location?
s
what would be your alternative way of pointing to that network location?
d
A UNC path can be used for virtual directories in IIS. As aliases are the 'substitution' for virtual directories, I would like to use the UNC path but apparently that doesn't work. Unless I'm missing something. So, perhaps I am confirming that only local drive letters may be used. I am attempting to troubleshoot the reason why my previously created drive mappings to network paths used to work. Trying to discover any 'work-arounds'.
b
Are you getting an error?
Also, show us your config
You may just not be escaping your backslashes in the json
@davidrschaller
d
I appreciate the reply @bdw429s. There is no error and I didn't originally make any config file changes. The CF will not start up, it just hangs until I either physically disconnect from the network when in the office or disconnect the VPN to my office when remote. ... config snip "aliases":{ "/common" : "C:\\websites\\common", "/forms" : "C:\\Websites\\shared\\forms", "/images" : "C:\\Websites\\shared\\images", "/screeningcal" : "C:\\Websites\\shared\\screeningCal", "/shared" : "C:\\Websites\\shared", "/testbox" : "C:\\ProgramData\\testbox", "/portaldocs" : "I:\\PortalDocs" } If I remove the "portaldocs" alias from the config, the CF server starts without issue. If I added back in, cf startup hangs, disconnect from network, cf starts, I reconnect to network, references to portaldocs works just fine. I've remapped the network drive using a different letter to no avail. [Network admin insists no changes to permissions / firewall, etc.]
b
I think I know what your hitting
You need to disable the resource manager file system watcher
It's probably taking forever to recursively scan your network drives.
@davidrschaller
I'm not entirely sure why you started off asking about UNC network paths though, because you're clearly not using them above.
Also, pro tip, using forward slashes in your paths prevents you from needing yo escape them
C:/path/here/
With the exception of UNC paths which require backslashes at the start.
\\server/share/ which would be \\\\server/share/ in the JSON
d
Thanks Brad. I'd prefer not to map a drive letter and point to the UNC path. I didn't see an example and was having trouble with the current method. So you are saying UNC paths can be used! Excellent!
b
As far as I know it should work.
d
UNC paths work great! Also, although I added "runwar.args":"--resource-manager-file-system-watcher=false", server was still hanging. "/portaldocs" path contains too many files/folders. Adding more specific aliases, ie. "/portaldocs/2022/" :"\\\\nt2/e/portalDocs/2022" - seems to work better as there are fewer files. ( I also didn't realize that the 'alias key' could include extended paths! ) This appears to be a working solution. Thanks for your help Brad! @bdw429s
b
Are you on CommandBox 5.5.2?
d
5.5.1
b
That's your problem
The runwar flag requires 5.5.2
d
Seems like I just updated .. of course there is a newer version.