Category : serilog

I want to write logs in MongoDB using serilog-sinks-mongodb package. MongoDB url has ssl=true and we wana use that url to write logs. In IIS everything is going well and logs are getting inside the mongo DB. but on docker, I am getting following error. —> ClusterId : 1, EndPoint : "Unspecified/host:1037" }", EndPoint: "Unspecified/host:1037", ..

Read more

We have a Web application, developed with ASP.Net Core and deployed on Azure using Docker container. The Web App uses serilog library (https://serilog.net/) as internal logging engine. The configuration of Serilog is stored in the file serilog.json, included in the Visual Studio Solution Explorer and, obviously, in the final Docker container. Using a special admin ..

Read more

I have setup an docker ELK stack for use with logging with SeriLog in c# and later I will import our legacy log4net logs. I have used Docker ELK stack for setting it up I’m running elasticsearch as singlenode. When running the elasticsearch sink I’m getting below stack trace. I then tried to disable the ..

Read more

Facing a strange issue when I run the .net 3.1 core web api using docker and use serilog public static void Main(string[] args) { var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build(); Log.Logger = new LoggerConfiguration().Enrich. FromLogContext() .CreateLogger() ; Log.Information("Application starting up"); CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) ****//on removing this i’m able to launch ..

Read more

When I run my dotnet core web application in Docker I get error Unhandled exception. System.IO.FileLoadException: Could not load file or assembly ‘System.Configuration.ConfigurationManager, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. The located assembly’s manifest definition does not match the assembly reference. (0x80131040) File name: ‘System.Configuration.ConfigurationManager, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ at System.Reflection.RuntimeAssembly.GetExportedTypes() at System.Reflection.Assembly.get_ExportedTypes() at Serilog.Settings.Configuration.ConfigurationReader.<>c.b__29_0(Assembly a) at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() ..

Read more

Having issues with a brownfield application (asp .netcore) migrating to a windows container running on mcr.microsoft.com/dotnet/core/aspnet:3.1 accessing the registry. Specifically, I’ve tried to run the application and make a call and I’m getting the below: Caught exception while emitting to sink Serilog.Core.Sinks.RestrictedSink: System.Security.SecurityException: The source was not found, but some or all event logs could ..

Read more