1

I did configure and program all the required logging.cs and log4net.config in my .NET web application. My application is deployed with all the web code files on Web Server and all business dlls on Application Server.

What I observe is that the logging class logs all the errors caught on Web Server and found not working on Application Server.

Please guide me how can I configure the log4net to work on Application Server.

Prem
  • 109
  • 1
  • 9
  • How do the two servers / application layers communicate with one another? is Log4Net deployed and configured in both locations? You can use log4net in a web application or a web service or a windows service or windows app, etc, etc. -- Is it configured but not working or not configured on Application Server? – Glenn Ferrie Feb 21 '19 at 02:42
  • Also, given the terms "Application Server" and "Web Server" -- is this SharePoint related? – Glenn Ferrie Feb 21 '19 at 02:43
  • @GlennFerrie This is not related to SharePoint. Initially the complete Web Application was deployed on a single Windows Server, but on Business Object implementation, the components have been split such that the communication is done in following fashion: Web Server <-> Application server <-> Database Server. – Prem Feb 21 '19 at 02:56
  • I haven't configured log4net on Application Server. I'm not allowed to place log4net.config on Application server, basically containing only dlls. Given that case how can I implement log4net on Application server. – Prem Feb 21 '19 at 03:00
  • Then you should probably consider to add an appender at runtime.... Look at this stackoverflow article: https://stackoverflow.com/questions/19833362/how-to-add-log4net-appender-in-runtime – Glenn Ferrie Feb 22 '19 at 16:02

0 Answers0