Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

In the sample app SerilogWeb.Test of the project log messages seem inconsistent #50

Closed
tsimbalar opened this issue Mar 10, 2018 · 1 comment

Comments

@tsimbalar
Copy link
Member

I first thought I had broken things while working on #49 , but I saw the same behavior when running from the master branch.

When debugging the application in VS 2017 + Firefox, I see log messages written to the Debug Output window that don't seem to match the observed behavior from the browser :

  1. when loading the default page (http://localhost:49951/), 3 events are written to the log when I expected only 2 :
2018-03-10 15:11:39.199 +01:00 [Information] Page viewed!
2018-03-10 15:11:39.217 +01:00 [Information] HTTP "GET" "/" responded 200 in 18ms
2018-03-10 15:11:39.220 +01:00 [Information] HTTP "GET" "/" responded 200 in 26ms
  1. when I click the (only) button of the only page , which throws an exception in the OnServerClick, I see 2 log events when I expected only 1 :
2018-03-10 15:12:50.952 +01:00 [Error] HTTP "POST" "/" responded 500 in 3697ms
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: Kablooey
   at SerilogWeb.Test.Default.Fail(Object sender, EventArgs e) in C:\Dev\classic\test\SerilogWeb.Test\Default.aspx.cs:line 17
   at System.Web.UI.HtmlControls.HtmlButton.OnServerClick(EventArgs e)
   ... snip ...
   at ASP.default_aspx.ProcessRequest(HttpContext context) in C:\Users\tdesodt.DEV\AppData\Local\Temp\Temporary ASP.NET Files\vs\d04cc936\cd123ae6\App_Web_lvoyjva2.0.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
2018-03-10 15:12:50.961 +01:00 [Information] HTTP "POST" "/" responded 200 in 3713ms
  1. when I navigate to a url that does not exist like http://localhost:49951/ThisDoesNotExist, while my browser sees a 404 status code, the following line appears in the logs, with status code 200 ....
2018-03-10 15:17:30.620 +01:00 [Information] HTTP "GET" "/ThisDoesNotExist" responded 200 in 1ms

I'm not quite sure whether that is the expected behavior, some subtle strange oddity of IIS Express, or some specific behavior of ASP.NET or WebForms ... that did surprise me though, so I'd love to understand what is going on here :)

@tsimbalar
Copy link
Member Author

This project is no longer being maintained and we are going to archive the SerilogWeb Repositories.

see:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant