Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AspNetSession layout renderer not working

I am using NLog for logging in my asp.net 4.5 website. I have used NLog 4.0. Now I need to use session variables in my logs. So i tries to use AspNetSession layout renderer. This layout renderer is included in Nlog.Web. I have added this dll and also under the extensions tag in NLog config file. But it gives the following error:

ArgumentException: LayoutRenderer cannot be found: 'aspnet-session'

I have also added NLog.extended dll and also under the extensions tag in NLog config file. But it also didn't help.

Please let me know what should i do.

enter image description here

like image 256
Deeps Avatar asked Jun 19 '15 07:06

Deeps


1 Answers

You need to install NLog.Web assembly from NuGet by using the following command.

Install-Package NLog.Web
like image 96
Viacheslav Yankov Avatar answered Oct 19 '22 19:10

Viacheslav Yankov