Closed ilhesam closed 2 years ago
{
"_id": {
"$binary": {
"base64": "xgEz2xf4TrWo9dE0u92pxQ==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651028757539"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/api/test/post",
"Protocol": "HTTP/1.1",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/api/test/post",
"QueryString": "",
"ContentType": "",
"ContentLength": {
"$numberLong": "0"
},
"Body": "",
"Headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "localhost:7197",
"User-Agent": "PostmanRuntime/7.28.4",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Content-Length": "0",
"Postman-Token": "13014493-53e7-4f3f-90f9-ba78c25e57f0"
}
},
"Response": {
"ContentType": "application/json; charset=utf-8",
"ContentLength": null,
"Body": "{\"errors\":[],\"debug\":[],\"traceId\":null,\"sessionId\":null,\"duration\":0,\"code\":200}",
"Headers": {
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 27 Apr 2022 03:05:56 GMT",
"Server": "Kestrel",
"Transfer-Encoding": "chunked"
}
},
"StatusCode": 200,
"Duration": {
"$numberLong": "200"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 82344,
"ProcessName": "API",
"ThreadId": 24,
"MemoryUsage": {
"$numberLong": "68108288"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VAD1JFT9:00000002",
"SessionId": "0HMH7VAD1JFT9:00000002",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": null
}
{
"_id": {
"$binary": {
"base64": "WlPZFQLzSYCSxWR/keMHGg==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651029048336"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/api/test/post",
"Protocol": "HTTP/1.1",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/api/test/post",
"QueryString": "",
"ContentType": "multipart/form-data; boundary=--------------------------141447829877221139742945",
"ContentLength": {
"$numberLong": "159"
},
"Body": "----------------------------141447829877221139742945\r\nContent-Disposition: form-data; name=\"tv\"\r\n\r\ntk\r\n----------------------------141447829877221139742945--\r\n",
"Headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "localhost:7197",
"User-Agent": "PostmanRuntime/7.28.4",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Content-Type": "multipart/form-data; boundary=--------------------------141447829877221139742945",
"Content-Length": "159",
"Postman-Token": "7457d4fd-1586-4afc-a57c-c2214dabf983"
}
},
"Response": {
"ContentType": "application/json; charset=utf-8",
"ContentLength": null,
"Body": "{\"errors\":[],\"debug\":[],\"traceId\":null,\"sessionId\":null,\"duration\":0,\"code\":200}",
"Headers": {
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 27 Apr 2022 03:10:47 GMT",
"Server": "Kestrel",
"Transfer-Encoding": "chunked"
}
},
"StatusCode": 200,
"Duration": {
"$numberLong": "78"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 82344,
"ProcessName": "API",
"ThreadId": 38,
"MemoryUsage": {
"$numberLong": "71180288"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VAD1JFT9:00000003",
"SessionId": "0HMH7VAD1JFT9:00000003",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": null
}
{
"_id": {
"$binary": {
"base64": "+fQKWurBRReYtyvl6f+eQA==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651029156083"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/api/test/post",
"Protocol": "HTTP/1.1",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/api/test/post",
"QueryString": "",
"ContentType": "application/x-www-form-urlencoded",
"ContentLength": {
"$numberLong": "5"
},
"Body": "tk=tv",
"Headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "localhost:7197",
"User-Agent": "PostmanRuntime/7.28.4",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Content-Type": "application/x-www-form-urlencoded",
"Content-Length": "5",
"Postman-Token": "2fcc0103-acf6-49f8-a32a-23122ff5a171"
}
},
"Response": {
"ContentType": "application/json; charset=utf-8",
"ContentLength": null,
"Body": "{\"errors\":[],\"debug\":[],\"traceId\":null,\"sessionId\":null,\"duration\":0,\"code\":200}",
"Headers": {
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 27 Apr 2022 03:12:35 GMT",
"Server": "Kestrel",
"Transfer-Encoding": "chunked"
}
},
"StatusCode": 200,
"Duration": {
"$numberLong": "21"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 82344,
"ProcessName": "API",
"ThreadId": 41,
"MemoryUsage": {
"$numberLong": "72097792"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VAD1JFT9:00000004",
"SessionId": "0HMH7VAD1JFT9:00000004",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": null
}
{
"_id": {
"$binary": {
"base64": "p3hKdeN2QcKfdgLVfpJCcw==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651029269644"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/api/test/post",
"Protocol": "HTTP/1.1",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/api/test/post",
"QueryString": "",
"ContentType": "application/pdf",
"ContentLength": {
"$numberLong": "267977"
},
"Body": "THIS IS BINARY",
"Headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "localhost:7197",
"User-Agent": "PostmanRuntime/7.28.4",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Content-Type": "application/pdf",
"Content-Length": "267977",
"Postman-Token": "659a60e9-b974-4682-8009-f4ef581d13ab"
}
},
"Response": {
"ContentType": "application/json; charset=utf-8",
"ContentLength": null,
"Body": "{\"errors\":[],\"debug\":[],\"traceId\":null,\"sessionId\":null,\"duration\":0,\"code\":200}",
"Headers": {
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 27 Apr 2022 03:14:29 GMT",
"Server": "Kestrel",
"Transfer-Encoding": "chunked"
}
},
"StatusCode": 200,
"Duration": {
"$numberLong": "52"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 82344,
"ProcessName": "API",
"ThreadId": 47,
"MemoryUsage": {
"$numberLong": "74809344"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VAD1JFT9:00000005",
"SessionId": "0HMH7VAD1JFT9:00000005",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": null
}
{
"_id": {
"$binary": {
"base64": "Wq9IFZtcQLCIo2yE3K8CkA==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651029564554"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/api/test/post",
"Protocol": "HTTP/1.1",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/api/test/post",
"QueryString": "",
"ContentType": "application/json",
"ContentLength": {
"$numberLong": "20"
},
"Body": "{\r\n \"tk\": \"tv\"\r\n}",
"Headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "localhost:7197",
"User-Agent": "PostmanRuntime/7.28.4",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Content-Type": "application/json",
"Content-Length": "20",
"Postman-Token": "79d47f08-c8c0-4e83-bd62-129c56608770"
}
},
"Response": {
"ContentType": "application/json; charset=utf-8",
"ContentLength": null,
"Body": "{\"errors\":[],\"debug\":[],\"traceId\":null,\"sessionId\":null,\"duration\":0,\"code\":200}",
"Headers": {
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 27 Apr 2022 03:19:23 GMT",
"Server": "Kestrel",
"Transfer-Encoding": "chunked"
}
},
"StatusCode": 200,
"Duration": {
"$numberLong": "22"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 82344,
"ProcessName": "API",
"ThreadId": 47,
"MemoryUsage": {
"$numberLong": "78708736"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VAD1JFT9:00000007",
"SessionId": "0HMH7VAD1JFT9:00000007",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": null
}
{
"_id": {
"$binary": {
"base64": "FZkwjRC2RY+PbKVah8P7iw==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651029623246"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/api/test/post",
"Protocol": "HTTP/1.1",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/api/test/post",
"QueryString": "",
"ContentType": "text/plain",
"ContentLength": {
"$numberLong": "12"
},
"Body": "this is text",
"Headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "localhost:7197",
"User-Agent": "PostmanRuntime/7.28.4",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Content-Type": "text/plain",
"Content-Length": "12",
"Postman-Token": "41c13fc9-633d-4ed6-8475-d22a11e5a8aa"
}
},
"Response": {
"ContentType": "application/json; charset=utf-8",
"ContentLength": null,
"Body": "{\"errors\":[],\"debug\":[],\"traceId\":null,\"sessionId\":null,\"duration\":0,\"code\":200}",
"Headers": {
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 27 Apr 2022 03:20:23 GMT",
"Server": "Kestrel",
"Transfer-Encoding": "chunked"
}
},
"StatusCode": 200,
"Duration": {
"$numberLong": "19"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 82344,
"ProcessName": "API",
"ThreadId": 45,
"MemoryUsage": {
"$numberLong": "77615104"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VAD1JFT9:00000008",
"SessionId": "0HMH7VAD1JFT9:00000008",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": null
}
{
"_id": {
"$binary": {
"base64": "bhaugFnxQ5mMSWBTD5RycQ==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651029746961"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/api/test/post?Ke=Va",
"Protocol": "HTTP/1.1",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/api/test/post",
"QueryString": "?Ke=Va",
"ContentType": "",
"ContentLength": {
"$numberLong": "0"
},
"Body": "",
"Headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "localhost:7197",
"User-Agent": "PostmanRuntime/7.28.4",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Content-Length": "0",
"Postman-Token": "67de3c60-dc47-4b48-ae5d-4c2e982dbf03"
}
},
"Response": {
"ContentType": "application/json; charset=utf-8",
"ContentLength": null,
"Body": "{\"errors\":[],\"debug\":[],\"traceId\":null,\"sessionId\":null,\"duration\":0,\"code\":200}",
"Headers": {
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 27 Apr 2022 03:22:26 GMT",
"Server": "Kestrel",
"Transfer-Encoding": "chunked"
}
},
"StatusCode": 200,
"Duration": {
"$numberLong": "26"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 82344,
"ProcessName": "API",
"ThreadId": 39,
"MemoryUsage": {
"$numberLong": "77598720"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VAD1JFT9:00000009",
"SessionId": "0HMH7VAD1JFT9:00000009",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": null
}
{
"_id": {
"$binary": {
"base64": "P8gxKOx8RtKmi/0Neg4T6w==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651030313782"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/api/test/post",
"Protocol": "HTTP/1.1",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/api/test/post",
"QueryString": "",
"ContentType": "",
"ContentLength": {
"$numberLong": "0"
},
"Body": "",
"Headers": {
"Accept": "*/*",
"Connection": "keep-alive",
"Host": "localhost:7197",
"User-Agent": "PostmanRuntime/7.28.4",
"Accept-Encoding": "gzip, deflate, br",
"Cache-Control": "no-cache",
"Content-Length": "0",
"Postman-Token": "213f5eff-a013-45cd-96ea-9ac4fdb4c6b4"
}
},
"Response": {
"ContentType": null,
"ContentLength": null,
"Body": "",
"Headers": {}
},
"StatusCode": 500,
"Duration": {
"$numberLong": "266"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 83568,
"ProcessName": "API",
"ThreadId": 16,
"MemoryUsage": {
"$numberLong": "70316032"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VPPPB6VR:00000002",
"SessionId": "0HMH7VPPPB6VR:00000002",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": {
"Data": {},
"HelpLink": null,
"HResult": -2146233088,
"Message": "Unhandled",
"Source": "uBeac.Core.Web.Common",
"StackTrace": " at uBeac.Web.ResultFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) in C:\\Users\\Hesam\\source\\repos\\ubeac-api\\src\\Web\\uBeac.Core.Web.Common\\Filters\\ResultFilter.cs:line 22\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at uBeac.Web.Logging.HttpLoggingMiddleware.Invoke(HttpContext context, IHttpLogRepository repository, IApplicationContext appContext) in C:\\Users\\Hesam\\source\\repos\\ubeac-api\\src\\Logging\\uBeac.Core.Web.Logging\\HttpLoggingMiddleware.cs:line 31"
}
}
{
"_id": {
"$binary": {
"base64": "GFgfw9YCRHiheSmO7QGS4Q==",
"subType": "04"
}
},
"Time": {
"$date": {
"$numberLong": "1651030825335"
}
},
"Request": {
"DisplayUrl": "https://localhost:7197/API/Accounts/Login",
"Protocol": "HTTP/2",
"Method": "POST",
"Scheme": "https",
"PathBase": "",
"Path": "/API/Accounts/Login",
"QueryString": "",
"ContentType": "application/json",
"ContentLength": {
"$numberLong": "50"
},
"Body": "{\n \"userName\": \"string\",\n \"password\": \"string\"\n}",
"Headers": {
"Accept": "application/json",
"Host": "localhost:7197",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36",
":method": "POST",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Content-Type": "application/json",
"Cookie": "ai_user=fyYNd|2022-03-23T08:25:11.386Z,.AspNetCore.Culture=c%3Den-US%7Cuic%3Den-US,ai_session=HdwIe|1651028663189|1651030782369.4",
"Origin": "https://localhost:7197",
"Referer": "https://localhost:7197/doc/index.html",
"Content-Length": "50",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"100\", \"Google Chrome\";v=\"100\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-site": "same-origin",
"sec-fetch-mode": "cors",
"sec-fetch-dest": "empty"
}
},
"Response": {
"ContentType": "application/json; charset=utf-8",
"ContentLength": null,
"Body": "{\"errors\":[{\"code\":\"UNKNOWN-ERROR\",\"description\":\"User doesn't exist or username/password is not valid!\"}],\"debug\":[],\"traceId\":\"0HMH7VUJ0NVFP:00000009\",\"sessionId\":\"0HMH7VUJ0NVFP:00000009\",\"duration\":162.9261,\"code\":500}",
"Headers": {
"Content-Type": "application/json; charset=utf-8",
"Date": "Wed, 27 Apr 2022 03:40:25 GMT",
"Server": "Kestrel"
}
},
"StatusCode": 500,
"Duration": {
"$numberLong": "232"
},
"AssemblyName": "uBeac.Core.Web.Logging",
"AssemblyVersion": "1.0.0.0",
"ProcessId": 61064,
"ProcessName": "API",
"ThreadId": 24,
"MemoryUsage": {
"$numberLong": "70762496"
},
"MachineName": "DESKTOP-RJ278VK",
"EnvironmentName": "Development",
"EnvironmentUserName": "Hesam",
"Context": {
"TraceId": "0HMH7VUJ0NVFP:00000009",
"SessionId": "0HMH7VUJ0NVFP:00000009",
"UserName": null,
"UserIp": "[::1]",
"Language": "en-US"
},
"Exception": {
"Data": {},
"HelpLink": null,
"HResult": -2146233088,
"Message": "User doesn't exist or username/password is not valid!",
"Source": "uBeac.Core.Identity",
"StackTrace": " at uBeac.Identity.UserService`2.Authenticate(String username, String password, CancellationToken cancellationToken) in C:\\Users\\Hesam\\source\\repos\\ubeac-api\\src\\Identity\\uBeac.Core.Identity\\Services\\UserService.cs:line 54\r\n at API.AccountsControllerBase`2.Login(LoginRequest model, CancellationToken cancellationToken) in C:\\Users\\Hesam\\source\\repos\\ubeac-api\\src\\Identity\\Tests\\API\\Controllers\\Base\\AccountsControllerBase.cs:line 37\r\n at lambda_method73(Closure , Object )\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)"
}
}
β How do I implement?
Put this code inside Startup.cs:
And configure your http-logging.json: