I have spotted an issue when deploying to a server and setting up App_Data as a virtual directory, even with correct permissions it will not write the log file.
If you give write permission to the site root Umbraco duplicates the App_Data folder and creates the log folder inside it!
I have the same issue and I'm fairly sure this is because regardless of the value being specified, log4net is converting the value to a physical path so ignoring the virtual directory.
The only way I know of is to specify the physical path to the app_data folder. Not ideal but prevents the duplication.
I have the same issue with a Umbraco form "umbracolicencinglog.txt" not liking virtual directories too.
My current solution is to have my ms build deployment create the app_data folder and assign permissions to allow writing to it.
If the virtual directory is setup prior to this then that takes priority over everything apart from the logs which are all that is written to that location.
This is more fail safe, a possible better solution I think is to do the same but with a specific "logs" folder and change the config so it writes logs to that location.
The only problem then is the licensing log for forms, if that uses log4net too or if there is a config for where it writes. If not the app_data folder would still need to be writable.
log4net configuration file virtual directory
Hi.
I have spotted an issue when deploying to a server and setting up App_Data as a virtual directory, even with correct permissions it will not write the log file.
If you give write permission to the site root Umbraco duplicates the App_Data folder and creates the log folder inside it!
The file location in the config file is ...
and I think it should really be more like...
However this creates the "~" directory
Any thoughts on how to get the log to write to a virtual directory on IIS?
Thanks
Carl
I have the same issue and I'm fairly sure this is because regardless of the value being specified, log4net is converting the value to a physical path so ignoring the virtual directory.
The only way I know of is to specify the physical path to the app_data folder. Not ideal but prevents the duplication.
Hi Kieron,
I have the same issue with a Umbraco form "umbracolicencinglog.txt" not liking virtual directories too.
My current solution is to have my ms build deployment create the app_data folder and assign permissions to allow writing to it.
If the virtual directory is setup prior to this then that takes priority over everything apart from the logs which are all that is written to that location.
This is more fail safe, a possible better solution I think is to do the same but with a specific "logs" folder and change the config so it writes logs to that location.
The only problem then is the licensing log for forms, if that uses log4net too or if there is a config for where it writes. If not the app_data folder would still need to be writable.
Thanks
Carl.
is working on a reply...