Using Nlog with ASP and .net component

3 messages Options
Embed this post
Permalink
Omar Khan

Using Nlog with ASP and .net component

Reply Threaded More More options
Print post
Permalink
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..................
C-J Berg

Re: Using Nlog with ASP and .net component

Reply Threaded More More options
Print post
Permalink
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..................
Omar Khan

Re: Using Nlog with ASP and .net component

Reply Threaded More More options
Print post
Permalink
Hi,

No we are using ASP as our front end. we have only transferred our COM components to .NET libraries.

I am trying to use NLog with ASP. we don't have web.config files in ASP.

Thanks
Omar