skip to Main Content

Asp.net – Can you run the IConfiguration Build in a 3rd party library

If I put this code in a 3rd party library I'm building. public class AsyncDb2Read { private readonly DB2Connection connection; public AsyncDb2Read() { var assembly = System.Reflection.Assembly.GetEntryAssembly(); var c = new ConfigurationBuilder() .AddUserSecrets(assembly, true) .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)…

VIEW QUESTION

Asp.net – Error executing child request with Server.Transfer

In our Global.asax file we have: protected void Application_Error() { Errors.Functions.HandleException(HttpContext.Current); } On a 404 error, the following code is executed: context.Server.Transfer("~/pages/errors/404.aspx"); context.ClearError(); context.ApplicationInstance.CompleteRequest(); This works absolutely fine for every 404 exception. However, we're seeing odd requests in our logs…

VIEW QUESTION
Back To Top
Search