skip to Main Content

How to return plain string as JSON in ASP.NET Core 7

In process of migrating from .net framework and are struggling with a difference of response serialization. Everything here seems to indicate that by default a response will go out via the json serializer. https://learn.microsoft.com/en-us/aspnet/core/web-api/advanced/formatting?view=aspnetcore-5.0 but when returning a simple string…

VIEW QUESTION

MySqlDataReader : I close the connection but get : There is already an open DataReader associated with this Connection which must be closed first

private void startPoll() { System.Diagnostics.Debug.WriteLine("dbForm created"); timer = new Timer(int.Parse(Properties.Settings.Default.DbPoll) * 1000); // ElapsedEventHandler OnEventExecution = null; timer.Elapsed += OnEventExecution; timer.Start(); System.Diagnostics.Debug.WriteLine("Timer Started " + Properties.Settings.Default.DbPoll + " secs"); string connectionString; // MySqlConnection conn; connectionString = "server=" + Properties.Settings.Default.DbServer +…

VIEW QUESTION
Back To Top
Search