Hi Omar,
I'm assuming you mean ASP.NET when you write "ASP and .net", because ASP (ASP.NET's predecessor) is quite outdated by now. The
NLog tutorial describes how NLog will search for its config file:
* standard web application file web.config
* web.nlog located in the same directory as web.config
* NLog.config in application's directory
* NLog.dll.nlog in a directory where NLog.dll is located
* file name pointed by the NLOG_GLOBAL_CONFIG_FILE environment variable (if defined)
I usually put NLog.config in the root of the web application. If you write the log to one or more files, you need to enable write access for the ASP.NET worker process group (IIS_WPG) to the target folder. (For security reasons, you should place the log folder outside the site's root.)
Hope it helps!
Omar Khan wrote:
Hi,
I am new to NLOG. Is their a way to use Nlog with ASP and .net component?
I have tried to use the configuration file "nlog.config" and rename it to nlog.dll.config and place it in the directory where nlog.dll is present with the rest of the registered .net component. But the .net component is picking up the configuration information.
Any help regarding this would be great..................