diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..7fcd6dc --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,28 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal diff --git a/.gitignore b/.gitignore index c07e4e3..e1cd9d1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,19 +3,24 @@ ################################################################################ /.vs -/Data/bin/Debug/net8.0 -/Data/obj/Debug/net8.0 +/Data/bin/Debug/net9.0 +/Data/obj/Debug/net9.0 /Data/obj -/Interface/bin/Debug/net8.0 -/Interface/obj/Debug/net8.0 -/Interface/obj/Release/net8.0 +/Interface/bin/Debug/net9.0 +/Interface/obj/Debug/net9.0 +/Interface/obj/Release/net9.0 /Interface/obj -/Model/bin/Debug/net8.0 +/Model/bin/Debug/net9.0 /Model/obj -/Repository/bin/Debug/net8.0 -/Repository/obj/Debug/net8.0 +/Repository/bin/Debug/net9.0 +/Repository/obj/Debug/net9.0 /Repository/obj -/Service/bin/Debug/net8.0 +/Service/bin/Debug/net9.0 /Service/obj /.vs/QuickURL/v17/.suo /logs +/QuickURL.AppHost/bin/Debug/net9.0 +/QuickURL.AppHost/obj +/QuickURL.ServiceDefaults/bin/Debug/net9.0 +/QuickURL.ServiceDefaults/obj +/Tests/obj diff --git a/Data/Data.csproj b/Data/Data.csproj index c89a1a5..5762585 100644 --- a/Data/Data.csproj +++ b/Data/Data.csproj @@ -1,15 +1,15 @@  - net8.0 + net9.0 enable enable True - - + + diff --git a/Interface/Interface.csproj b/Interface/Interface.csproj index 44d926a..8c7d09d 100644 --- a/Interface/Interface.csproj +++ b/Interface/Interface.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable True diff --git a/Model/Model.csproj b/Model/Model.csproj index c5b6490..5b82081 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -1,14 +1,14 @@  - net8.0 + net9.0 enable enable True - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/QuickURL.AppHost/Program.cs b/QuickURL.AppHost/Program.cs new file mode 100644 index 0000000..22343b0 --- /dev/null +++ b/QuickURL.AppHost/Program.cs @@ -0,0 +1,5 @@ +var builder = DistributedApplication.CreateBuilder(args); + +builder.AddProject("service"); + +builder.Build().Run(); diff --git a/QuickURL.AppHost/Properties/launchSettings.json b/QuickURL.AppHost/Properties/launchSettings.json new file mode 100644 index 0000000..63a1eaa --- /dev/null +++ b/QuickURL.AppHost/Properties/launchSettings.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:17012;http://localhost:15101", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21092", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22018" + } + }, + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:15101", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19075", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20055" + } + } + } +} diff --git a/QuickURL.AppHost/QuickURL.AppHost.csproj b/QuickURL.AppHost/QuickURL.AppHost.csproj new file mode 100644 index 0000000..8a90ac8 --- /dev/null +++ b/QuickURL.AppHost/QuickURL.AppHost.csproj @@ -0,0 +1,22 @@ + + + + + + Exe + net9.0 + enable + enable + true + 749608e3-27bd-400b-8a8f-3e29eabed30e + + + + + + + + + + + diff --git a/QuickURL.AppHost/appsettings.Development.json b/QuickURL.AppHost/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/QuickURL.AppHost/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/QuickURL.AppHost/appsettings.json b/QuickURL.AppHost/appsettings.json new file mode 100644 index 0000000..31c092a --- /dev/null +++ b/QuickURL.AppHost/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "Aspire.Hosting.Dcp": "Warning" + } + } +} diff --git a/QuickURL.ServiceDefaults/Extensions.cs b/QuickURL.ServiceDefaults/Extensions.cs new file mode 100644 index 0000000..13151bf --- /dev/null +++ b/QuickURL.ServiceDefaults/Extensions.cs @@ -0,0 +1,119 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Diagnostics.HealthChecks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Diagnostics.HealthChecks; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.ServiceDiscovery; +using OpenTelemetry; +using OpenTelemetry.Metrics; +using OpenTelemetry.Trace; + +namespace Microsoft.Extensions.Hosting; + +// Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry. +// This project should be referenced by each service project in your solution. +// To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults +public static class Extensions +{ + public static TBuilder AddServiceDefaults(this TBuilder builder) where TBuilder : IHostApplicationBuilder + { + builder.ConfigureOpenTelemetry(); + + builder.AddDefaultHealthChecks(); + + builder.Services.AddServiceDiscovery(); + + builder.Services.ConfigureHttpClientDefaults(http => + { + // Turn on resilience by default + http.AddStandardResilienceHandler(); + + // Turn on service discovery by default + http.AddServiceDiscovery(); + }); + + // Uncomment the following to restrict the allowed schemes for service discovery. + // builder.Services.Configure(options => + // { + // options.AllowedSchemes = ["https"]; + // }); + + return builder; + } + + public static TBuilder ConfigureOpenTelemetry(this TBuilder builder) where TBuilder : IHostApplicationBuilder + { + builder.Logging.AddOpenTelemetry(logging => + { + logging.IncludeFormattedMessage = true; + logging.IncludeScopes = true; + }); + + builder.Services.AddOpenTelemetry() + .WithMetrics(metrics => + { + metrics.AddAspNetCoreInstrumentation() + .AddHttpClientInstrumentation() + .AddRuntimeInstrumentation(); + }) + .WithTracing(tracing => + { + tracing.AddSource(builder.Environment.ApplicationName) + .AddAspNetCoreInstrumentation() + // Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package) + //.AddGrpcClientInstrumentation() + .AddHttpClientInstrumentation(); + }); + + builder.AddOpenTelemetryExporters(); + + return builder; + } + + private static TBuilder AddOpenTelemetryExporters(this TBuilder builder) where TBuilder : IHostApplicationBuilder + { + var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]); + + if (useOtlpExporter) + { + builder.Services.AddOpenTelemetry().UseOtlpExporter(); + } + + // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) + //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) + //{ + // builder.Services.AddOpenTelemetry() + // .UseAzureMonitor(); + //} + + return builder; + } + + public static TBuilder AddDefaultHealthChecks(this TBuilder builder) where TBuilder : IHostApplicationBuilder + { + builder.Services.AddHealthChecks() + // Add a default liveness check to ensure app is responsive + .AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]); + + return builder; + } + + public static WebApplication MapDefaultEndpoints(this WebApplication app) + { + // Adding health checks endpoints to applications in non-development environments has security implications. + // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments. + if (app.Environment.IsDevelopment()) + { + // All health checks must pass for app to be considered ready to accept traffic after starting + app.MapHealthChecks("/health"); + + // Only health checks tagged with the "live" tag must pass for app to be considered alive + app.MapHealthChecks("/alive", new HealthCheckOptions + { + Predicate = r => r.Tags.Contains("live") + }); + } + + return app; + } +} diff --git a/QuickURL.ServiceDefaults/QuickURL.ServiceDefaults.csproj b/QuickURL.ServiceDefaults/QuickURL.ServiceDefaults.csproj new file mode 100644 index 0000000..24b1b4f --- /dev/null +++ b/QuickURL.ServiceDefaults/QuickURL.ServiceDefaults.csproj @@ -0,0 +1,22 @@ + + + + net9.0 + enable + enable + true + + + + + + + + + + + + + + + diff --git a/QuickURL.sln b/QuickURL.sln index dfb56f6..e30303f 100644 --- a/QuickURL.sln +++ b/QuickURL.sln @@ -13,6 +13,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Interface", "Interface\Inte EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Repository", "Repository\Repository.csproj", "{A8B13C06-0D2C-4C61-A73F-E70F5BB00C20}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickURL.AppHost", "QuickURL.AppHost\QuickURL.AppHost.csproj", "{63FE1258-6E14-4A78-AAEA-00941575EABE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickURL.ServiceDefaults", "QuickURL.ServiceDefaults\QuickURL.ServiceDefaults.csproj", "{E2812DE2-C2C5-4520-AE83-86E306BAF592}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{2392E8C2-9877-472A-9D5B-A55248FC31C7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +45,18 @@ Global {A8B13C06-0D2C-4C61-A73F-E70F5BB00C20}.Debug|Any CPU.Build.0 = Debug|Any CPU {A8B13C06-0D2C-4C61-A73F-E70F5BB00C20}.Release|Any CPU.ActiveCfg = Release|Any CPU {A8B13C06-0D2C-4C61-A73F-E70F5BB00C20}.Release|Any CPU.Build.0 = Release|Any CPU + {63FE1258-6E14-4A78-AAEA-00941575EABE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63FE1258-6E14-4A78-AAEA-00941575EABE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63FE1258-6E14-4A78-AAEA-00941575EABE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63FE1258-6E14-4A78-AAEA-00941575EABE}.Release|Any CPU.Build.0 = Release|Any CPU + {E2812DE2-C2C5-4520-AE83-86E306BAF592}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2812DE2-C2C5-4520-AE83-86E306BAF592}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2812DE2-C2C5-4520-AE83-86E306BAF592}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2812DE2-C2C5-4520-AE83-86E306BAF592}.Release|Any CPU.Build.0 = Release|Any CPU + {2392E8C2-9877-472A-9D5B-A55248FC31C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2392E8C2-9877-472A-9D5B-A55248FC31C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2392E8C2-9877-472A-9D5B-A55248FC31C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2392E8C2-9877-472A-9D5B-A55248FC31C7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Repository/Repository.csproj b/Repository/Repository.csproj index 270f432..af081b2 100644 --- a/Repository/Repository.csproj +++ b/Repository/Repository.csproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 enable enable True diff --git a/Service/Controllers/ShortnerController.cs b/Service/Controllers/ShortnerController.cs index 3aa6c4b..b427e0d 100644 --- a/Service/Controllers/ShortnerController.cs +++ b/Service/Controllers/ShortnerController.cs @@ -4,7 +4,7 @@ namespace Service.Controllers { - [Route("api")] + [Route("")] [ApiController] public class ShortnerController : ControllerBase { @@ -15,17 +15,17 @@ public ShortnerController(IShortnerService shortnerService) _shortnerService = shortnerService; } - [HttpGet("{key}")] - public async Task RedirectUrl(string key) - { - return await this._shortnerService.RedirectToMainURL(key); - } - [HttpPost] public async Task ShortenUrl([FromBody] string originalUrl) { - var domain = HttpContext.Request.GetDisplayUrl(); + string domain = HttpContext.Request.GetDisplayUrl(); return await this._shortnerService.ShortenUrlKeyGenerator(originalUrl, domain); } + + [HttpGet("{key}")] + public async Task RedirectUrl(string key) + { + return await this._shortnerService.RedirectToMainURL(key); + } } } diff --git a/Service/Program.cs b/Service/Program.cs index 12b4890..9225482 100644 --- a/Service/Program.cs +++ b/Service/Program.cs @@ -1,7 +1,6 @@ using Data.QuickDb; using Interface.ShortnerInterface.Repository; using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Configuration; using Repository.ShortnerRepository; using Serilog; using Service.Service; @@ -13,6 +12,8 @@ .CreateLogger(); var builder = WebApplication.CreateBuilder(args); +builder.AddServiceDefaults(); + //Adding Serilogger to Invoice generator app builder.Host.UseSerilog(); @@ -40,6 +41,8 @@ var app = builder.Build(); +app.MapDefaultEndpoints(); + // Configure the HTTP request pipeline. //if (app.Environment.IsDevelopment()) //{ diff --git a/Service/Service.csproj b/Service/Service.csproj index a578a23..f690f79 100644 --- a/Service/Service.csproj +++ b/Service/Service.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable true @@ -11,24 +11,24 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - - - - - - + + + + + + + + + @@ -37,6 +37,7 @@ + diff --git a/Service/Service/ShortnerService.cs b/Service/Service/ShortnerService.cs index 874ccaa..1d8adeb 100644 --- a/Service/Service/ShortnerService.cs +++ b/Service/Service/ShortnerService.cs @@ -29,7 +29,7 @@ public async Task ShortenUrlKeyGenerator(string originalUrl, stri // Generate a unique key for the shortened URL (you may use a library for this) await this._shortnerRepository.CreateShortendToken(mapping); - return Ok(new { QuickURl = domain+'/'+key }); + return Ok(new { QuickURl = domain +key }); } return BadRequest("Invalid URL"); } diff --git a/Service/logs/QuickURLlogs2025010823.txt b/Service/logs/QuickURLlogs2025010823.txt new file mode 100644 index 0000000..7e33de4 --- /dev/null +++ b/Service/logs/QuickURLlogs2025010823.txt @@ -0,0 +1,518 @@ +2025-01-08 23:32:26.193 +05:30 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.TryParseModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2025-01-08 23:32:26.359 +05:30 [DBG] Hosting starting +2025-01-08 23:32:26.930 +05:30 [DBG] Middleware configuration started with options: {AllowedHosts = *, AllowEmptyHosts = True, IncludeFailureMessage = True} +2025-01-08 23:32:26.934 +05:30 [DBG] Wildcard detected, all requests with hosts will be allowed. +2025-01-08 23:32:27.063 +05:30 [INF] Now listening on: https://localhost:49905 +2025-01-08 23:32:27.064 +05:30 [INF] Now listening on: http://localhost:49906 +2025-01-08 23:32:27.064 +05:30 [DBG] Loaded hosting startup assembly Service +2025-01-08 23:32:27.064 +05:30 [DBG] Loaded hosting startup assembly Microsoft.WebTools.ApiEndpointDiscovery +2025-01-08 23:32:27.064 +05:30 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2025-01-08 23:32:27.064 +05:30 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2025-01-08 23:32:27.073 +05:30 [DBG] Executing API description provider 'EndpointMetadataApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v9.0.0.0. +2025-01-08 23:32:27.074 +05:30 [DBG] Executing API description provider 'DefaultApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v9.0.0.0. +2025-01-08 23:32:27.082 +05:30 [DBG] Executing API description provider 'JsonPatchOperationsArrayProvider' from assembly Microsoft.AspNetCore.Mvc.NewtonsoftJson v9.0.0.0. +2025-01-08 23:32:27.271 +05:30 [DBG] Connection id "0HN9G1QEAP1M4" accepted. +2025-01-08 23:32:27.291 +05:30 [DBG] Connection id "0HN9G1QEAP1M4" started. +2025-01-08 23:32:27.341 +05:30 [DBG] Connection id "0HN9G1QEAP1M5" accepted. +2025-01-08 23:32:27.343 +05:30 [DBG] Connection id "0HN9G1QEAP1M5" started. +2025-01-08 23:32:27.370 +05:30 [INF] Application started. Press Ctrl+C to shut down. +2025-01-08 23:32:27.370 +05:30 [INF] Hosting environment: Development +2025-01-08 23:32:27.371 +05:30 [INF] Content root path: C:\Users\extinctsion\Desktop\New folder\quick-backend\Service +2025-01-08 23:32:27.371 +05:30 [DBG] Hosting started +2025-01-08 23:32:27.410 +05:30 [DBG] Connection 0HN9G1QEAP1M4 established using the following protocol: "Tls12" +2025-01-08 23:32:27.410 +05:30 [DBG] Connection 0HN9G1QEAP1M5 established using the following protocol: "Tls12" +2025-01-08 23:32:27.415 +05:30 [DBG] Connection id "0HN9G1QEAP1M4" received FIN. +2025-01-08 23:32:27.454 +05:30 [DBG] Connection id "0HN9G1QEAP1M4" is closed. The last processed stream ID was 0. +2025-01-08 23:32:27.476 +05:30 [DBG] Connection id "0HN9G1QEAP1M4" sending FIN because: "The Socket transport's send loop completed gracefully." +2025-01-08 23:32:27.482 +05:30 [DBG] The connection queue processing loop for 0HN9G1QEAP1M4 completed. +2025-01-08 23:32:27.486 +05:30 [DBG] Connection id "0HN9G1QEAP1M4" stopped. +2025-01-08 23:32:27.551 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger - null null +2025-01-08 23:32:27.801 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.html - null null +2025-01-08 23:32:27.793 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger - 301 0 null 257.76ms +2025-01-08 23:32:27.952 +05:30 [DBG] Response markup is scheduled to include Browser Link script injection. +2025-01-08 23:32:27.959 +05:30 [DBG] Response markup is scheduled to include browser refresh script injection. +2025-01-08 23:32:27.973 +05:30 [DBG] Response markup was updated to include Browser Link script injection. +2025-01-08 23:32:27.974 +05:30 [DBG] Response markup was updated to include browser refresh script injection. +2025-01-08 23:32:27.975 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.html - 200 null text/html;charset=utf-8 174.0169ms +2025-01-08 23:32:28.044 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.css - null null +2025-01-08 23:32:28.044 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/swagger-ui.css - null null +2025-01-08 23:32:28.048 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/swagger-ui-bundle.js - null null +2025-01-08 23:32:28.050 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/swagger-ui-standalone-preset.js - null null +2025-01-08 23:32:28.064 +05:30 [INF] Sending file. Request path: '/index.css'. Physical path: 'N/A' +2025-01-08 23:32:28.065 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.css - 200 202 text/css 20.6369ms +2025-01-08 23:32:28.080 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.js - null null +2025-01-08 23:32:28.080 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - null null +2025-01-08 23:32:28.081 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.js - 200 null application/javascript;charset=utf-8 6.7506ms +2025-01-08 23:32:28.112 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - 200 13766 application/javascript; charset=utf-8 31.7326ms +2025-01-08 23:32:28.118 +05:30 [INF] Sending file. Request path: '/swagger-ui-standalone-preset.js'. Physical path: 'N/A' +2025-01-08 23:32:28.121 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/swagger-ui-standalone-preset.js - 200 230007 text/javascript 71.2334ms +2025-01-08 23:32:28.118 +05:30 [INF] Sending file. Request path: '/swagger-ui.css'. Physical path: 'N/A' +2025-01-08 23:32:28.193 +05:30 [INF] Sending file. Request path: '/swagger-ui-bundle.js'. Physical path: 'N/A' +2025-01-08 23:32:28.193 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/swagger-ui-bundle.js - 200 1426050 text/javascript 145.3908ms +2025-01-08 23:32:28.194 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/swagger-ui.css - 200 152035 text/css 150.2497ms +2025-01-08 23:32:28.376 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_vs/browserLink - null null +2025-01-08 23:32:28.563 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_vs/browserLink - 200 null text/javascript; charset=UTF-8 187.0663ms +2025-01-08 23:32:28.846 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - null null +2025-01-08 23:32:28.860 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - 200 null application/json;charset=utf-8 13.8726ms +2025-01-08 23:32:28.951 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/favicon-32x32.png - null null +2025-01-08 23:32:28.953 +05:30 [INF] Sending file. Request path: '/favicon-32x32.png'. Physical path: 'N/A' +2025-01-08 23:32:28.953 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/favicon-32x32.png - 200 628 image/png 2.1353ms +2025-01-08 23:38:56.794 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.html - null null +2025-01-08 23:38:56.800 +05:30 [DBG] Response markup is scheduled to include Browser Link script injection. +2025-01-08 23:38:56.800 +05:30 [DBG] Response markup is scheduled to include browser refresh script injection. +2025-01-08 23:38:56.801 +05:30 [DBG] Response markup was updated to include Browser Link script injection. +2025-01-08 23:38:56.801 +05:30 [DBG] Response markup was updated to include browser refresh script injection. +2025-01-08 23:38:56.801 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.html - 200 null text/html;charset=utf-8 7.2743ms +2025-01-08 23:38:56.873 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.js - null null +2025-01-08 23:38:56.873 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - null null +2025-01-08 23:38:56.873 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.js - 200 null application/javascript;charset=utf-8 0.5868ms +2025-01-08 23:38:56.874 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - 200 13766 application/javascript; charset=utf-8 1.2851ms +2025-01-08 23:38:56.989 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_vs/browserLink - null null +2025-01-08 23:38:57.001 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_vs/browserLink - 200 null text/javascript; charset=UTF-8 12.0076ms +2025-01-08 23:38:57.200 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - null null +2025-01-08 23:38:57.205 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - 200 null application/json;charset=utf-8 5.2925ms +2025-01-08 23:43:13.848 +05:30 [INF] Request starting HTTP/2 POST https://localhost:7297/ - application/json-patch+json 104 +2025-01-08 23:43:13.850 +05:30 [DBG] POST requests are not supported +2025-01-08 23:43:13.853 +05:30 [INF] No CORS policy found for the specified request. +2025-01-08 23:43:13.876 +05:30 [DBG] 1 candidate(s) found for the request path '/' +2025-01-08 23:43:13.877 +05:30 [DBG] Endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' with route pattern '' is valid for the request path '/' +2025-01-08 23:43:13.878 +05:30 [DBG] Request matched endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-08 23:43:13.884 +05:30 [INF] Executing endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-08 23:43:13.916 +05:30 [INF] Route matched with {action = "ShortenUrl", controller = "Shortner"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ShortenUrl(System.String) on controller Service.Controllers.ShortnerController (Service). +2025-01-08 23:43:13.917 +05:30 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2025-01-08 23:43:13.918 +05:30 [DBG] Execution plan of resource filters (in the following order): ["None"] +2025-01-08 23:43:13.919 +05:30 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2025-01-08 23:43:13.919 +05:30 [DBG] Execution plan of exception filters (in the following order): ["None"] +2025-01-08 23:43:13.919 +05:30 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2025-01-08 23:43:13.922 +05:30 [DBG] Executing controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:43:14.684 +05:30 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2025-01-08 23:43:14.705 +05:30 [DBG] Executed controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:43:14.727 +05:30 [DBG] Attempting to bind parameter 'originalUrl' of type 'System.String' ... +2025-01-08 23:43:14.731 +05:30 [DBG] Attempting to bind parameter 'originalUrl' of type 'System.String' using the name '' in request data ... +2025-01-08 23:43:14.732 +05:30 [DBG] Rejected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter' for content type 'application/json-patch+json'. +2025-01-08 23:43:14.733 +05:30 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter' for content type 'application/json-patch+json'. +2025-01-08 23:43:14.757 +05:30 [DBG] Connection id "0HN9G1QEAP1M5", Request id "0HN9G1QEAP1M5:00000021": started reading request body. +2025-01-08 23:43:14.757 +05:30 [DBG] Connection id "0HN9G1QEAP1M5", Request id "0HN9G1QEAP1M5:00000021": done reading request body. +2025-01-08 23:43:14.804 +05:30 [DBG] Done attempting to bind parameter 'originalUrl' of type 'System.String'. +2025-01-08 23:43:14.804 +05:30 [DBG] Done attempting to bind parameter 'originalUrl' of type 'System.String'. +2025-01-08 23:43:14.804 +05:30 [DBG] Attempting to validate the bound parameter 'originalUrl' of type 'System.String' ... +2025-01-08 23:43:14.810 +05:30 [DBG] Done attempting to validate the bound parameter 'originalUrl' of type 'System.String'. +2025-01-08 23:43:14.815 +05:30 [INF] Executing action method Service.Controllers.ShortnerController.ShortenUrl (Service) - Validation state: "Valid" +2025-01-08 23:43:15.318 +05:30 [DBG] Entity Framework Core 9.0.0 initialized 'QuickDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:9.0.2+697dd7182173ff3450eddc63b44837fba76331df' with options: None +2025-01-08 23:43:15.359 +05:30 [DBG] 'QuickDbContext' generated a temporary value for the property 'Shortner.Id'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-08 23:43:15.410 +05:30 [DBG] Context 'QuickDbContext' started tracking 'Shortner' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-08 23:43:15.415 +05:30 [DBG] SaveChanges starting for 'QuickDbContext'. +2025-01-08 23:43:15.419 +05:30 [DBG] DetectChanges starting for 'QuickDbContext'. +2025-01-08 23:43:15.430 +05:30 [DBG] DetectChanges completed for 'QuickDbContext'. +2025-01-08 23:43:15.541 +05:30 [DBG] Creating DbConnection. +2025-01-08 23:43:15.577 +05:30 [DBG] Created DbConnection. (34ms). +2025-01-08 23:43:15.582 +05:30 [DBG] Opening connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:17.493 +05:30 [DBG] Opened connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:17.504 +05:30 [DBG] Creating DbCommand for 'ExecuteReader'. +2025-01-08 23:43:17.509 +05:30 [DBG] Created DbCommand for 'ExecuteReader' (5ms). +2025-01-08 23:43:17.517 +05:30 [DBG] Initialized DbCommand for 'ExecuteReader' (13ms). +2025-01-08 23:43:17.526 +05:30 [DBG] Executing DbCommand [Parameters=[@p0='?' (DbType = DateTime), @p1='?', @p2='?' (DbType = DateTime), @p3='?'], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO "Shortner" ("CreatedAt", "GeneratedKey", "LastUpdatedAt", "URL") +VALUES (@p0, @p1, @p2, @p3) +RETURNING "Id"; +2025-01-08 23:43:17.844 +05:30 [INF] Executed DbCommand (317ms) [Parameters=[@p0='?' (DbType = DateTime), @p1='?', @p2='?' (DbType = DateTime), @p3='?'], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO "Shortner" ("CreatedAt", "GeneratedKey", "LastUpdatedAt", "URL") +VALUES (@p0, @p1, @p2, @p3) +RETURNING "Id"; +2025-01-08 23:43:17.866 +05:30 [DBG] The foreign key property 'Shortner.Id' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2025-01-08 23:43:17.873 +05:30 [DBG] Closing data reader to 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:17.882 +05:30 [DBG] A data reader for 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' is being disposed after spending 31ms reading results. +2025-01-08 23:43:17.885 +05:30 [DBG] Closing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:17.890 +05:30 [DBG] Closed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (4ms). +2025-01-08 23:43:17.901 +05:30 [DBG] An entity of type 'Shortner' tracked by 'QuickDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-08 23:43:17.903 +05:30 [DBG] SaveChanges completed for 'QuickDbContext' with 1 entities written to the database. +2025-01-08 23:43:17.908 +05:30 [INF] Executed action method Service.Controllers.ShortnerController.ShortenUrl (Service), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 3089.7018ms. +2025-01-08 23:43:17.913 +05:30 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter"] +2025-01-08 23:43:17.915 +05:30 [DBG] No information found on request to perform content negotiation. +2025-01-08 23:43:17.915 +05:30 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2025-01-08 23:43:17.915 +05:30 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2025-01-08 23:43:17.917 +05:30 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter' and content type 'application/json' to write the response. +2025-01-08 23:43:17.917 +05:30 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType0`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. +2025-01-08 23:43:17.972 +05:30 [INF] Executed action Service.Controllers.ShortnerController.ShortenUrl (Service) in 4050.1162ms +2025-01-08 23:43:17.973 +05:30 [INF] Executed endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-08 23:43:17.979 +05:30 [DBG] 'QuickDbContext' disposed. +2025-01-08 23:43:17.985 +05:30 [DBG] Disposing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:17.988 +05:30 [DBG] Disposed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (2ms). +2025-01-08 23:43:17.989 +05:30 [INF] Request finished HTTP/2 POST https://localhost:7297/ - 200 47 application/json; charset=utf-8 4140.398ms +2025-01-08 23:43:36.183 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297//66f48f14 - null null +2025-01-08 23:43:36.189 +05:30 [DBG] The request path does not match the path filter +2025-01-08 23:43:36.196 +05:30 [DBG] No candidates found for the request path '//66f48f14' +2025-01-08 23:43:36.197 +05:30 [DBG] Request did not match any endpoints +2025-01-08 23:43:36.198 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297//66f48f14 - 404 0 null 15.1778ms +2025-01-08 23:43:36.200 +05:30 [INF] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET https://localhost:7297//66f48f14, Response status code: 404 +2025-01-08 23:43:41.093 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/66f48f14 - null null +2025-01-08 23:43:41.096 +05:30 [DBG] The request path does not match the path filter +2025-01-08 23:43:41.102 +05:30 [DBG] 1 candidate(s) found for the request path '/66f48f14' +2025-01-08 23:43:41.103 +05:30 [DBG] Endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' with route pattern '{key}' is valid for the request path '/66f48f14' +2025-01-08 23:43:41.103 +05:30 [DBG] Request matched endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:43:41.104 +05:30 [INF] Executing endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:43:41.122 +05:30 [INF] Route matched with {action = "RedirectUrl", controller = "Shortner"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] RedirectUrl(System.String) on controller Service.Controllers.ShortnerController (Service). +2025-01-08 23:43:41.122 +05:30 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2025-01-08 23:43:41.123 +05:30 [DBG] Execution plan of resource filters (in the following order): ["None"] +2025-01-08 23:43:41.123 +05:30 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2025-01-08 23:43:41.123 +05:30 [DBG] Execution plan of exception filters (in the following order): ["None"] +2025-01-08 23:43:41.123 +05:30 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2025-01-08 23:43:41.123 +05:30 [DBG] Executing controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:43:41.126 +05:30 [DBG] Executed controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:43:41.127 +05:30 [DBG] Attempting to bind parameter 'key' of type 'System.String' ... +2025-01-08 23:43:41.129 +05:30 [DBG] Attempting to bind parameter 'key' of type 'System.String' using the name 'key' in request data ... +2025-01-08 23:43:41.131 +05:30 [DBG] Done attempting to bind parameter 'key' of type 'System.String'. +2025-01-08 23:43:41.131 +05:30 [DBG] Done attempting to bind parameter 'key' of type 'System.String'. +2025-01-08 23:43:41.131 +05:30 [DBG] Attempting to validate the bound parameter 'key' of type 'System.String' ... +2025-01-08 23:43:41.134 +05:30 [DBG] Done attempting to validate the bound parameter 'key' of type 'System.String'. +2025-01-08 23:43:41.134 +05:30 [INF] Executing action method Service.Controllers.ShortnerController.RedirectUrl (Service) - Validation state: "Valid" +2025-01-08 23:43:41.321 +05:30 [DBG] Entity Framework Core 9.0.0 initialized 'QuickDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:9.0.2+697dd7182173ff3450eddc63b44837fba76331df' with options: None +2025-01-08 23:43:41.478 +05:30 [DBG] Compiling query expression: +'DbSet() + .Where(u => u.GeneratedKey == __key_0) + .Select(u => u.URL) + .FirstOrDefault()' +2025-01-08 23:43:42.014 +05:30 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: SingleQueryingEnumerable.Create( + relationalQueryContext: (RelationalQueryContext)queryContext, + relationalCommandResolver: parameters => [LIFTABLE Constant: RelationalCommandCache.QueryExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT TOP(1) s.URL + FROM Shortner AS s + WHERE s.GeneratedKey == @__key_0) | Resolver: c => new RelationalCommandCache( + c.Dependencies.MemoryCache, + c.RelationalDependencies.QuerySqlGeneratorFactory, + c.RelationalDependencies.RelationalParameterBasedSqlProcessorFactory, + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT TOP(1) s.URL + FROM Shortner AS s + WHERE s.GeneratedKey == @__key_0, + False, + new HashSet( + new string[]{ }, + StringComparer.Ordinal + ) + )].GetRelationalCommandTemplate(parameters), + readerColumns: null, + shaper: (queryContext, dataReader, resultContext, resultCoordinator) => + { + string value1; + value1 = dataReader.IsDBNull(0) ? default(string) : dataReader.GetString(0); + return value1; + }, + contextType: Data.QuickDb.QuickDbContext, + standAloneStateManager: False, + detailedErrorsEnabled: False, + threadSafetyChecksEnabled: True), + cancellationToken: queryContext.CancellationToken)' +2025-01-08 23:43:42.125 +05:30 [DBG] Creating DbConnection. +2025-01-08 23:43:42.126 +05:30 [DBG] Created DbConnection. (0ms). +2025-01-08 23:43:42.126 +05:30 [DBG] Opening connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:42.127 +05:30 [DBG] Opened connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:42.128 +05:30 [DBG] Creating DbCommand for 'ExecuteReader'. +2025-01-08 23:43:42.128 +05:30 [DBG] Created DbCommand for 'ExecuteReader' (0ms). +2025-01-08 23:43:42.128 +05:30 [DBG] Initialized DbCommand for 'ExecuteReader' (0ms). +2025-01-08 23:43:42.128 +05:30 [DBG] Executing DbCommand [Parameters=[@__key_0='?'], CommandType='"Text"', CommandTimeout='30'] +SELECT s."URL" +FROM "Shortner" AS s +WHERE s."GeneratedKey" = @__key_0 +LIMIT 1 +2025-01-08 23:43:42.516 +05:30 [INF] Executed DbCommand (388ms) [Parameters=[@__key_0='?'], CommandType='"Text"', CommandTimeout='30'] +SELECT s."URL" +FROM "Shortner" AS s +WHERE s."GeneratedKey" = @__key_0 +LIMIT 1 +2025-01-08 23:43:42.525 +05:30 [DBG] Closing data reader to 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:42.527 +05:30 [DBG] A data reader for 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' is being disposed after spending 10ms reading results. +2025-01-08 23:43:42.527 +05:30 [DBG] Closing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:42.527 +05:30 [DBG] Closed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (0ms). +2025-01-08 23:43:42.528 +05:30 [INF] Executed action method Service.Controllers.ShortnerController.RedirectUrl (Service), returned result Microsoft.AspNetCore.Mvc.RedirectResult in 1393.5656ms. +2025-01-08 23:43:42.531 +05:30 [INF] Executing RedirectResult, redirecting to https://cloud.tembo.io/orgs/org_2gGxOSLnyvNO4p2rY31TcYIEsOB/instances/inst_1715337827100_E6ic64_4/home. +2025-01-08 23:43:42.531 +05:30 [INF] Executed action Service.Controllers.ShortnerController.RedirectUrl (Service) in 1407.7571ms +2025-01-08 23:43:42.531 +05:30 [INF] Executed endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:43:42.531 +05:30 [DBG] 'QuickDbContext' disposed. +2025-01-08 23:43:42.531 +05:30 [DBG] Disposing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:43:42.531 +05:30 [DBG] Disposed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (0ms). +2025-01-08 23:43:42.532 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/66f48f14 - 302 0 null 1439.0743ms +2025-01-08 23:55:45.927 +05:30 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.TryParseModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2025-01-08 23:55:46.049 +05:30 [DBG] Hosting starting +2025-01-08 23:55:46.444 +05:30 [DBG] Middleware configuration started with options: {AllowedHosts = *, AllowEmptyHosts = True, IncludeFailureMessage = True} +2025-01-08 23:55:46.448 +05:30 [DBG] Wildcard detected, all requests with hosts will be allowed. +2025-01-08 23:55:46.541 +05:30 [INF] Now listening on: https://localhost:50756 +2025-01-08 23:55:46.542 +05:30 [INF] Now listening on: http://localhost:50757 +2025-01-08 23:55:46.543 +05:30 [DBG] Loaded hosting startup assembly Service +2025-01-08 23:55:46.543 +05:30 [DBG] Loaded hosting startup assembly Microsoft.WebTools.ApiEndpointDiscovery +2025-01-08 23:55:46.543 +05:30 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2025-01-08 23:55:46.543 +05:30 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2025-01-08 23:55:46.554 +05:30 [DBG] Executing API description provider 'EndpointMetadataApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v9.0.0.0. +2025-01-08 23:55:46.554 +05:30 [DBG] Executing API description provider 'DefaultApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v9.0.0.0. +2025-01-08 23:55:46.564 +05:30 [DBG] Executing API description provider 'JsonPatchOperationsArrayProvider' from assembly Microsoft.AspNetCore.Mvc.NewtonsoftJson v9.0.0.0. +2025-01-08 23:55:46.622 +05:30 [INF] Application started. Press Ctrl+C to shut down. +2025-01-08 23:55:46.623 +05:30 [INF] Hosting environment: Development +2025-01-08 23:55:46.623 +05:30 [INF] Content root path: C:\Users\extinctsion\Desktop\New folder\quick-backend\Service +2025-01-08 23:55:46.623 +05:30 [DBG] Hosting started +2025-01-08 23:55:47.475 +05:30 [DBG] Connection id "0HN9G27FK5JF1" accepted. +2025-01-08 23:55:47.484 +05:30 [DBG] Connection id "0HN9G27FK5JF1" started. +2025-01-08 23:55:47.504 +05:30 [DBG] Connection 0HN9G27FK5JF1 established using the following protocol: "Tls12" +2025-01-08 23:55:47.782 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.html - null null +2025-01-08 23:55:47.944 +05:30 [DBG] Response markup is scheduled to include Browser Link script injection. +2025-01-08 23:55:47.946 +05:30 [DBG] Response markup is scheduled to include browser refresh script injection. +2025-01-08 23:55:47.955 +05:30 [DBG] Response markup was updated to include Browser Link script injection. +2025-01-08 23:55:47.956 +05:30 [DBG] Response markup was updated to include browser refresh script injection. +2025-01-08 23:55:47.960 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.html - 200 null text/html;charset=utf-8 195.0212ms +2025-01-08 23:55:48.002 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.js - null null +2025-01-08 23:55:48.004 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.js - 200 null application/javascript;charset=utf-8 2.3825ms +2025-01-08 23:55:48.006 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - null null +2025-01-08 23:55:48.024 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - 200 13766 application/javascript; charset=utf-8 15.9864ms +2025-01-08 23:55:48.123 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_vs/browserLink - null null +2025-01-08 23:55:48.186 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_vs/browserLink - 200 null text/javascript; charset=UTF-8 63.4681ms +2025-01-08 23:55:48.266 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - null null +2025-01-08 23:55:48.276 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - 200 null application/json;charset=utf-8 10.4175ms +2025-01-08 23:56:04.864 +05:30 [INF] Request starting HTTP/2 POST https://localhost:7297/ - application/json-patch+json 60 +2025-01-08 23:56:04.866 +05:30 [DBG] POST requests are not supported +2025-01-08 23:56:04.868 +05:30 [INF] No CORS policy found for the specified request. +2025-01-08 23:56:04.891 +05:30 [DBG] 1 candidate(s) found for the request path '/' +2025-01-08 23:56:04.891 +05:30 [DBG] Endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' with route pattern '' is valid for the request path '/' +2025-01-08 23:56:04.892 +05:30 [DBG] Request matched endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-08 23:56:04.898 +05:30 [INF] Executing endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-08 23:56:04.918 +05:30 [INF] Route matched with {action = "ShortenUrl", controller = "Shortner"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ShortenUrl(System.String) on controller Service.Controllers.ShortnerController (Service). +2025-01-08 23:56:04.921 +05:30 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2025-01-08 23:56:04.921 +05:30 [DBG] Execution plan of resource filters (in the following order): ["None"] +2025-01-08 23:56:04.923 +05:30 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2025-01-08 23:56:04.923 +05:30 [DBG] Execution plan of exception filters (in the following order): ["None"] +2025-01-08 23:56:04.923 +05:30 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2025-01-08 23:56:04.925 +05:30 [DBG] Executing controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:56:05.044 +05:30 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2025-01-08 23:56:05.063 +05:30 [DBG] Executed controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:56:05.073 +05:30 [DBG] Attempting to bind parameter 'originalUrl' of type 'System.String' ... +2025-01-08 23:56:05.075 +05:30 [DBG] Attempting to bind parameter 'originalUrl' of type 'System.String' using the name '' in request data ... +2025-01-08 23:56:05.076 +05:30 [DBG] Rejected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter' for content type 'application/json-patch+json'. +2025-01-08 23:56:05.077 +05:30 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter' for content type 'application/json-patch+json'. +2025-01-08 23:56:05.088 +05:30 [DBG] Connection id "0HN9G27FK5JF1", Request id "0HN9G27FK5JF1:0000000B": started reading request body. +2025-01-08 23:56:05.089 +05:30 [DBG] Connection id "0HN9G27FK5JF1", Request id "0HN9G27FK5JF1:0000000B": done reading request body. +2025-01-08 23:56:05.123 +05:30 [DBG] Done attempting to bind parameter 'originalUrl' of type 'System.String'. +2025-01-08 23:56:05.123 +05:30 [DBG] Done attempting to bind parameter 'originalUrl' of type 'System.String'. +2025-01-08 23:56:05.123 +05:30 [DBG] Attempting to validate the bound parameter 'originalUrl' of type 'System.String' ... +2025-01-08 23:56:05.131 +05:30 [DBG] Done attempting to validate the bound parameter 'originalUrl' of type 'System.String'. +2025-01-08 23:56:05.136 +05:30 [INF] Executing action method Service.Controllers.ShortnerController.ShortenUrl (Service) - Validation state: "Valid" +2025-01-08 23:56:05.584 +05:30 [DBG] Entity Framework Core 9.0.0 initialized 'QuickDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:9.0.2+697dd7182173ff3450eddc63b44837fba76331df' with options: None +2025-01-08 23:56:05.623 +05:30 [DBG] 'QuickDbContext' generated a temporary value for the property 'Shortner.Id'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-08 23:56:05.671 +05:30 [DBG] Context 'QuickDbContext' started tracking 'Shortner' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-08 23:56:05.675 +05:30 [DBG] SaveChanges starting for 'QuickDbContext'. +2025-01-08 23:56:05.679 +05:30 [DBG] DetectChanges starting for 'QuickDbContext'. +2025-01-08 23:56:05.690 +05:30 [DBG] DetectChanges completed for 'QuickDbContext'. +2025-01-08 23:56:05.798 +05:30 [DBG] Creating DbConnection. +2025-01-08 23:56:05.824 +05:30 [DBG] Created DbConnection. (25ms). +2025-01-08 23:56:05.829 +05:30 [DBG] Opening connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:07.752 +05:30 [DBG] Opened connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:07.759 +05:30 [DBG] Creating DbCommand for 'ExecuteReader'. +2025-01-08 23:56:07.766 +05:30 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2025-01-08 23:56:07.772 +05:30 [DBG] Initialized DbCommand for 'ExecuteReader' (12ms). +2025-01-08 23:56:07.780 +05:30 [DBG] Executing DbCommand [Parameters=[@p0='?' (DbType = DateTime), @p1='?', @p2='?' (DbType = DateTime), @p3='?'], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO "Shortner" ("CreatedAt", "GeneratedKey", "LastUpdatedAt", "URL") +VALUES (@p0, @p1, @p2, @p3) +RETURNING "Id"; +2025-01-08 23:56:08.063 +05:30 [INF] Executed DbCommand (283ms) [Parameters=[@p0='?' (DbType = DateTime), @p1='?', @p2='?' (DbType = DateTime), @p3='?'], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO "Shortner" ("CreatedAt", "GeneratedKey", "LastUpdatedAt", "URL") +VALUES (@p0, @p1, @p2, @p3) +RETURNING "Id"; +2025-01-08 23:56:08.081 +05:30 [DBG] The foreign key property 'Shortner.Id' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2025-01-08 23:56:08.088 +05:30 [DBG] Closing data reader to 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:08.096 +05:30 [DBG] A data reader for 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' is being disposed after spending 28ms reading results. +2025-01-08 23:56:08.100 +05:30 [DBG] Closing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:08.104 +05:30 [DBG] Closed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (4ms). +2025-01-08 23:56:08.116 +05:30 [DBG] An entity of type 'Shortner' tracked by 'QuickDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-08 23:56:08.118 +05:30 [DBG] SaveChanges completed for 'QuickDbContext' with 1 entities written to the database. +2025-01-08 23:56:08.123 +05:30 [INF] Executed action method Service.Controllers.ShortnerController.ShortenUrl (Service), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 2984.3402ms. +2025-01-08 23:56:08.128 +05:30 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter"] +2025-01-08 23:56:08.130 +05:30 [DBG] No information found on request to perform content negotiation. +2025-01-08 23:56:08.131 +05:30 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2025-01-08 23:56:08.131 +05:30 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2025-01-08 23:56:08.132 +05:30 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter' and content type 'application/json' to write the response. +2025-01-08 23:56:08.133 +05:30 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType0`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. +2025-01-08 23:56:08.192 +05:30 [INF] Executed action Service.Controllers.ShortnerController.ShortenUrl (Service) in 3266.4642ms +2025-01-08 23:56:08.193 +05:30 [INF] Executed endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-08 23:56:08.198 +05:30 [DBG] 'QuickDbContext' disposed. +2025-01-08 23:56:08.203 +05:30 [DBG] Disposing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:08.205 +05:30 [DBG] Disposed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (1ms). +2025-01-08 23:56:08.205 +05:30 [INF] Request finished HTTP/2 POST https://localhost:7297/ - 200 46 application/json; charset=utf-8 3341.582ms +2025-01-08 23:56:31.079 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/2b634fd6 - null null +2025-01-08 23:56:31.087 +05:30 [DBG] The request path does not match the path filter +2025-01-08 23:56:31.093 +05:30 [DBG] 1 candidate(s) found for the request path '/2b634fd6' +2025-01-08 23:56:31.094 +05:30 [DBG] Endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' with route pattern '{key}' is valid for the request path '/2b634fd6' +2025-01-08 23:56:31.094 +05:30 [DBG] Request matched endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:56:31.094 +05:30 [INF] Executing endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:56:31.103 +05:30 [INF] Route matched with {action = "RedirectUrl", controller = "Shortner"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] RedirectUrl(System.String) on controller Service.Controllers.ShortnerController (Service). +2025-01-08 23:56:31.103 +05:30 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2025-01-08 23:56:31.103 +05:30 [DBG] Execution plan of resource filters (in the following order): ["None"] +2025-01-08 23:56:31.103 +05:30 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2025-01-08 23:56:31.103 +05:30 [DBG] Execution plan of exception filters (in the following order): ["None"] +2025-01-08 23:56:31.103 +05:30 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2025-01-08 23:56:31.103 +05:30 [DBG] Executing controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:56:31.104 +05:30 [DBG] Executed controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:56:31.105 +05:30 [DBG] Attempting to bind parameter 'key' of type 'System.String' ... +2025-01-08 23:56:31.105 +05:30 [DBG] Attempting to bind parameter 'key' of type 'System.String' using the name 'key' in request data ... +2025-01-08 23:56:31.107 +05:30 [DBG] Done attempting to bind parameter 'key' of type 'System.String'. +2025-01-08 23:56:31.107 +05:30 [DBG] Done attempting to bind parameter 'key' of type 'System.String'. +2025-01-08 23:56:31.107 +05:30 [DBG] Attempting to validate the bound parameter 'key' of type 'System.String' ... +2025-01-08 23:56:31.108 +05:30 [DBG] Done attempting to validate the bound parameter 'key' of type 'System.String'. +2025-01-08 23:56:31.109 +05:30 [INF] Executing action method Service.Controllers.ShortnerController.RedirectUrl (Service) - Validation state: "Valid" +2025-01-08 23:56:31.186 +05:30 [DBG] Entity Framework Core 9.0.0 initialized 'QuickDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:9.0.2+697dd7182173ff3450eddc63b44837fba76331df' with options: None +2025-01-08 23:56:31.237 +05:30 [DBG] Compiling query expression: +'DbSet() + .Where(u => u.GeneratedKey == __key_0) + .Select(u => u.URL) + .FirstOrDefault()' +2025-01-08 23:56:31.407 +05:30 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: SingleQueryingEnumerable.Create( + relationalQueryContext: (RelationalQueryContext)queryContext, + relationalCommandResolver: parameters => [LIFTABLE Constant: RelationalCommandCache.QueryExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT TOP(1) s.URL + FROM Shortner AS s + WHERE s.GeneratedKey == @__key_0) | Resolver: c => new RelationalCommandCache( + c.Dependencies.MemoryCache, + c.RelationalDependencies.QuerySqlGeneratorFactory, + c.RelationalDependencies.RelationalParameterBasedSqlProcessorFactory, + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT TOP(1) s.URL + FROM Shortner AS s + WHERE s.GeneratedKey == @__key_0, + False, + new HashSet( + new string[]{ }, + StringComparer.Ordinal + ) + )].GetRelationalCommandTemplate(parameters), + readerColumns: null, + shaper: (queryContext, dataReader, resultContext, resultCoordinator) => + { + string value1; + value1 = dataReader.IsDBNull(0) ? default(string) : dataReader.GetString(0); + return value1; + }, + contextType: Data.QuickDb.QuickDbContext, + standAloneStateManager: False, + detailedErrorsEnabled: False, + threadSafetyChecksEnabled: True), + cancellationToken: queryContext.CancellationToken)' +2025-01-08 23:56:31.460 +05:30 [DBG] Creating DbConnection. +2025-01-08 23:56:31.460 +05:30 [DBG] Created DbConnection. (0ms). +2025-01-08 23:56:31.460 +05:30 [DBG] Opening connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:31.461 +05:30 [DBG] Opened connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:31.461 +05:30 [DBG] Creating DbCommand for 'ExecuteReader'. +2025-01-08 23:56:31.461 +05:30 [DBG] Created DbCommand for 'ExecuteReader' (0ms). +2025-01-08 23:56:31.461 +05:30 [DBG] Initialized DbCommand for 'ExecuteReader' (0ms). +2025-01-08 23:56:31.462 +05:30 [DBG] Executing DbCommand [Parameters=[@__key_0='?'], CommandType='"Text"', CommandTimeout='30'] +SELECT s."URL" +FROM "Shortner" AS s +WHERE s."GeneratedKey" = @__key_0 +LIMIT 1 +2025-01-08 23:56:31.674 +05:30 [INF] Executed DbCommand (213ms) [Parameters=[@__key_0='?'], CommandType='"Text"', CommandTimeout='30'] +SELECT s."URL" +FROM "Shortner" AS s +WHERE s."GeneratedKey" = @__key_0 +LIMIT 1 +2025-01-08 23:56:31.681 +05:30 [DBG] Closing data reader to 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:31.683 +05:30 [DBG] A data reader for 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' is being disposed after spending 8ms reading results. +2025-01-08 23:56:31.683 +05:30 [DBG] Closing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:31.683 +05:30 [DBG] Closed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (0ms). +2025-01-08 23:56:31.684 +05:30 [INF] Executed action method Service.Controllers.ShortnerController.RedirectUrl (Service), returned result Microsoft.AspNetCore.Mvc.RedirectResult in 574.8941ms. +2025-01-08 23:56:31.687 +05:30 [INF] Executing RedirectResult, redirecting to https://chatgpt.com/c/677ec2ae-1790-800c-9e40-8adbfda0ce88. +2025-01-08 23:56:31.687 +05:30 [INF] Executed action Service.Controllers.ShortnerController.RedirectUrl (Service) in 584.0413ms +2025-01-08 23:56:31.687 +05:30 [INF] Executed endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:56:31.688 +05:30 [DBG] 'QuickDbContext' disposed. +2025-01-08 23:56:31.688 +05:30 [DBG] Disposing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:31.688 +05:30 [DBG] Disposed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (0ms). +2025-01-08 23:56:31.688 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/2b634fd6 - 302 0 null 609.2992ms +2025-01-08 23:56:39.367 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/2b634fd6 - null null +2025-01-08 23:56:39.369 +05:30 [DBG] The request path does not match the path filter +2025-01-08 23:56:39.371 +05:30 [DBG] 1 candidate(s) found for the request path '/2b634fd6' +2025-01-08 23:56:39.372 +05:30 [DBG] Endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' with route pattern '{key}' is valid for the request path '/2b634fd6' +2025-01-08 23:56:39.372 +05:30 [DBG] Request matched endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:56:39.373 +05:30 [INF] Executing endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:56:39.374 +05:30 [INF] Route matched with {action = "RedirectUrl", controller = "Shortner"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] RedirectUrl(System.String) on controller Service.Controllers.ShortnerController (Service). +2025-01-08 23:56:39.375 +05:30 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2025-01-08 23:56:39.375 +05:30 [DBG] Execution plan of resource filters (in the following order): ["None"] +2025-01-08 23:56:39.375 +05:30 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2025-01-08 23:56:39.375 +05:30 [DBG] Execution plan of exception filters (in the following order): ["None"] +2025-01-08 23:56:39.376 +05:30 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2025-01-08 23:56:39.376 +05:30 [DBG] Executing controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:56:39.382 +05:30 [DBG] Executed controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-08 23:56:39.382 +05:30 [DBG] Attempting to bind parameter 'key' of type 'System.String' ... +2025-01-08 23:56:39.382 +05:30 [DBG] Attempting to bind parameter 'key' of type 'System.String' using the name 'key' in request data ... +2025-01-08 23:56:39.383 +05:30 [DBG] Done attempting to bind parameter 'key' of type 'System.String'. +2025-01-08 23:56:39.383 +05:30 [DBG] Done attempting to bind parameter 'key' of type 'System.String'. +2025-01-08 23:56:39.383 +05:30 [DBG] Attempting to validate the bound parameter 'key' of type 'System.String' ... +2025-01-08 23:56:39.383 +05:30 [DBG] Done attempting to validate the bound parameter 'key' of type 'System.String'. +2025-01-08 23:56:39.383 +05:30 [INF] Executing action method Service.Controllers.ShortnerController.RedirectUrl (Service) - Validation state: "Valid" +2025-01-08 23:56:39.407 +05:30 [DBG] Entity Framework Core 9.0.0 initialized 'QuickDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:9.0.2+697dd7182173ff3450eddc63b44837fba76331df' with options: None +2025-01-08 23:56:39.417 +05:30 [DBG] Creating DbConnection. +2025-01-08 23:56:39.417 +05:30 [DBG] Created DbConnection. (0ms). +2025-01-08 23:56:39.417 +05:30 [DBG] Opening connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:39.417 +05:30 [DBG] Opened connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:39.417 +05:30 [DBG] Creating DbCommand for 'ExecuteReader'. +2025-01-08 23:56:39.417 +05:30 [DBG] Created DbCommand for 'ExecuteReader' (0ms). +2025-01-08 23:56:39.417 +05:30 [DBG] Initialized DbCommand for 'ExecuteReader' (0ms). +2025-01-08 23:56:39.418 +05:30 [DBG] Executing DbCommand [Parameters=[@__key_0='?'], CommandType='"Text"', CommandTimeout='30'] +SELECT s."URL" +FROM "Shortner" AS s +WHERE s."GeneratedKey" = @__key_0 +LIMIT 1 +2025-01-08 23:56:39.629 +05:30 [INF] Executed DbCommand (211ms) [Parameters=[@__key_0='?'], CommandType='"Text"', CommandTimeout='30'] +SELECT s."URL" +FROM "Shortner" AS s +WHERE s."GeneratedKey" = @__key_0 +LIMIT 1 +2025-01-08 23:56:39.630 +05:30 [DBG] Closing data reader to 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:39.630 +05:30 [DBG] A data reader for 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' is being disposed after spending 0ms reading results. +2025-01-08 23:56:39.630 +05:30 [DBG] Closing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:39.630 +05:30 [DBG] Closed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (0ms). +2025-01-08 23:56:39.630 +05:30 [INF] Executed action method Service.Controllers.ShortnerController.RedirectUrl (Service), returned result Microsoft.AspNetCore.Mvc.RedirectResult in 246.8042ms. +2025-01-08 23:56:39.631 +05:30 [INF] Executing RedirectResult, redirecting to https://chatgpt.com/c/677ec2ae-1790-800c-9e40-8adbfda0ce88. +2025-01-08 23:56:39.631 +05:30 [INF] Executed action Service.Controllers.ShortnerController.RedirectUrl (Service) in 254.9667ms +2025-01-08 23:56:39.631 +05:30 [INF] Executed endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-08 23:56:39.631 +05:30 [DBG] 'QuickDbContext' disposed. +2025-01-08 23:56:39.631 +05:30 [DBG] Disposing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-08 23:56:39.631 +05:30 [DBG] Disposed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (0ms). +2025-01-08 23:56:39.631 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/2b634fd6 - 302 0 null 264.8856ms +2025-01-08 23:58:29.858 +05:30 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.TryParseModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2025-01-08 23:58:30.119 +05:30 [DBG] Hosting starting +2025-01-08 23:58:30.949 +05:30 [DBG] Middleware configuration started with options: {AllowedHosts = *, AllowEmptyHosts = True, IncludeFailureMessage = True} +2025-01-08 23:58:30.958 +05:30 [DBG] Wildcard detected, all requests with hosts will be allowed. +2025-01-08 23:58:31.171 +05:30 [INF] Now listening on: https://localhost:50786 +2025-01-08 23:58:31.173 +05:30 [INF] Now listening on: http://localhost:50787 +2025-01-08 23:58:31.173 +05:30 [DBG] Loaded hosting startup assembly Service +2025-01-08 23:58:31.173 +05:30 [DBG] Loaded hosting startup assembly Microsoft.WebTools.ApiEndpointDiscovery +2025-01-08 23:58:31.173 +05:30 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2025-01-08 23:58:31.173 +05:30 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2025-01-08 23:58:31.198 +05:30 [DBG] Executing API description provider 'EndpointMetadataApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v9.0.0.0. +2025-01-08 23:58:31.201 +05:30 [DBG] Executing API description provider 'DefaultApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v9.0.0.0. +2025-01-08 23:58:31.218 +05:30 [DBG] Executing API description provider 'JsonPatchOperationsArrayProvider' from assembly Microsoft.AspNetCore.Mvc.NewtonsoftJson v9.0.0.0. +2025-01-08 23:58:31.346 +05:30 [INF] Application started. Press Ctrl+C to shut down. +2025-01-08 23:58:31.347 +05:30 [INF] Hosting environment: Development +2025-01-08 23:58:31.347 +05:30 [INF] Content root path: C:\Users\extinctsion\Desktop\New folder\quick-backend\Service +2025-01-08 23:58:31.347 +05:30 [DBG] Hosting started +2025-01-08 23:58:37.986 +05:30 [DBG] Connection id "0HN9G292E9B0K" accepted. +2025-01-08 23:58:37.994 +05:30 [DBG] Connection id "0HN9G292E9B0K" started. +2025-01-08 23:58:38.018 +05:30 [DBG] Connection 0HN9G292E9B0K established using the following protocol: "Tls12" +2025-01-08 23:58:38.302 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.html - null null +2025-01-08 23:58:38.442 +05:30 [DBG] Response markup is scheduled to include Browser Link script injection. +2025-01-08 23:58:38.445 +05:30 [DBG] Response markup is scheduled to include browser refresh script injection. +2025-01-08 23:58:38.457 +05:30 [DBG] Response markup was updated to include Browser Link script injection. +2025-01-08 23:58:38.459 +05:30 [DBG] Response markup was updated to include browser refresh script injection. +2025-01-08 23:58:38.491 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - null null +2025-01-08 23:58:38.462 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.html - 200 null text/html;charset=utf-8 177.6219ms +2025-01-08 23:58:38.504 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.js - null null +2025-01-08 23:58:38.506 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.js - 200 null application/javascript;charset=utf-8 2.3245ms +2025-01-08 23:58:38.509 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - 200 13766 application/javascript; charset=utf-8 18.3662ms +2025-01-08 23:58:38.650 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_vs/browserLink - null null +2025-01-08 23:58:38.717 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_vs/browserLink - 200 null text/javascript; charset=UTF-8 66.5454ms +2025-01-08 23:58:38.789 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - null null +2025-01-08 23:58:38.802 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - 200 null application/json;charset=utf-8 13.4618ms diff --git a/Service/logs/QuickURLlogs2025010900.txt b/Service/logs/QuickURLlogs2025010900.txt new file mode 100644 index 0000000..8a19f79 --- /dev/null +++ b/Service/logs/QuickURLlogs2025010900.txt @@ -0,0 +1,262 @@ +2025-01-09 00:00:25.188 +05:30 [INF] Request starting HTTP/2 POST https://localhost:7297/quickurl - application/json-patch+json 60 +2025-01-09 00:00:25.197 +05:30 [DBG] POST requests are not supported +2025-01-09 00:00:25.200 +05:30 [INF] No CORS policy found for the specified request. +2025-01-09 00:00:25.225 +05:30 [DBG] 1 candidate(s) found for the request path '/quickurl' +2025-01-09 00:00:25.226 +05:30 [DBG] Endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' with route pattern 'quickurl' is valid for the request path '/quickurl' +2025-01-09 00:00:25.228 +05:30 [DBG] Request matched endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-09 00:00:25.232 +05:30 [INF] Executing endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-09 00:00:25.257 +05:30 [INF] Route matched with {action = "ShortenUrl", controller = "Shortner"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ShortenUrl(System.String) on controller Service.Controllers.ShortnerController (Service). +2025-01-09 00:00:25.262 +05:30 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2025-01-09 00:00:25.262 +05:30 [DBG] Execution plan of resource filters (in the following order): ["None"] +2025-01-09 00:00:25.264 +05:30 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2025-01-09 00:00:25.264 +05:30 [DBG] Execution plan of exception filters (in the following order): ["None"] +2025-01-09 00:00:25.264 +05:30 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2025-01-09 00:00:25.267 +05:30 [DBG] Executing controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-09 00:00:25.401 +05:30 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2025-01-09 00:00:25.419 +05:30 [DBG] Executed controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-09 00:00:25.430 +05:30 [DBG] Attempting to bind parameter 'originalUrl' of type 'System.String' ... +2025-01-09 00:00:25.432 +05:30 [DBG] Attempting to bind parameter 'originalUrl' of type 'System.String' using the name '' in request data ... +2025-01-09 00:00:25.433 +05:30 [DBG] Rejected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter' for content type 'application/json-patch+json'. +2025-01-09 00:00:25.434 +05:30 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter' for content type 'application/json-patch+json'. +2025-01-09 00:00:25.448 +05:30 [DBG] Connection id "0HN9G292E9B0K", Request id "0HN9G292E9B0K:0000000B": started reading request body. +2025-01-09 00:00:25.448 +05:30 [DBG] Connection id "0HN9G292E9B0K", Request id "0HN9G292E9B0K:0000000B": done reading request body. +2025-01-09 00:00:25.497 +05:30 [DBG] Done attempting to bind parameter 'originalUrl' of type 'System.String'. +2025-01-09 00:00:25.497 +05:30 [DBG] Done attempting to bind parameter 'originalUrl' of type 'System.String'. +2025-01-09 00:00:25.497 +05:30 [DBG] Attempting to validate the bound parameter 'originalUrl' of type 'System.String' ... +2025-01-09 00:00:25.504 +05:30 [DBG] Done attempting to validate the bound parameter 'originalUrl' of type 'System.String'. +2025-01-09 00:00:25.516 +05:30 [INF] Executing action method Service.Controllers.ShortnerController.ShortenUrl (Service) - Validation state: "Valid" +2025-01-09 00:00:26.142 +05:30 [DBG] Entity Framework Core 9.0.0 initialized 'QuickDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:9.0.2+697dd7182173ff3450eddc63b44837fba76331df' with options: None +2025-01-09 00:00:26.189 +05:30 [DBG] 'QuickDbContext' generated a temporary value for the property 'Shortner.Id'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-09 00:00:26.255 +05:30 [DBG] Context 'QuickDbContext' started tracking 'Shortner' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-09 00:00:26.259 +05:30 [DBG] SaveChanges starting for 'QuickDbContext'. +2025-01-09 00:00:26.264 +05:30 [DBG] DetectChanges starting for 'QuickDbContext'. +2025-01-09 00:00:26.281 +05:30 [DBG] DetectChanges completed for 'QuickDbContext'. +2025-01-09 00:00:26.447 +05:30 [DBG] Creating DbConnection. +2025-01-09 00:00:26.481 +05:30 [DBG] Created DbConnection. (32ms). +2025-01-09 00:00:26.485 +05:30 [DBG] Opening connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:00:28.374 +05:30 [DBG] Opened connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:00:28.384 +05:30 [DBG] Creating DbCommand for 'ExecuteReader'. +2025-01-09 00:00:28.389 +05:30 [DBG] Created DbCommand for 'ExecuteReader' (3ms). +2025-01-09 00:00:28.397 +05:30 [DBG] Initialized DbCommand for 'ExecuteReader' (13ms). +2025-01-09 00:00:28.405 +05:30 [DBG] Executing DbCommand [Parameters=[@p0='?' (DbType = DateTime), @p1='?', @p2='?' (DbType = DateTime), @p3='?'], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO "Shortner" ("CreatedAt", "GeneratedKey", "LastUpdatedAt", "URL") +VALUES (@p0, @p1, @p2, @p3) +RETURNING "Id"; +2025-01-09 00:00:28.701 +05:30 [INF] Executed DbCommand (293ms) [Parameters=[@p0='?' (DbType = DateTime), @p1='?', @p2='?' (DbType = DateTime), @p3='?'], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO "Shortner" ("CreatedAt", "GeneratedKey", "LastUpdatedAt", "URL") +VALUES (@p0, @p1, @p2, @p3) +RETURNING "Id"; +2025-01-09 00:00:28.720 +05:30 [DBG] The foreign key property 'Shortner.Id' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2025-01-09 00:00:28.730 +05:30 [DBG] Closing data reader to 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:00:28.739 +05:30 [DBG] A data reader for 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' is being disposed after spending 33ms reading results. +2025-01-09 00:00:28.744 +05:30 [DBG] Closing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:00:28.750 +05:30 [DBG] Closed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (6ms). +2025-01-09 00:00:28.764 +05:30 [DBG] An entity of type 'Shortner' tracked by 'QuickDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-09 00:00:28.767 +05:30 [DBG] SaveChanges completed for 'QuickDbContext' with 1 entities written to the database. +2025-01-09 00:00:28.774 +05:30 [INF] Executed action method Service.Controllers.ShortnerController.ShortenUrl (Service), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 3253.8657ms. +2025-01-09 00:00:28.781 +05:30 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter"] +2025-01-09 00:00:28.784 +05:30 [DBG] No information found on request to perform content negotiation. +2025-01-09 00:00:28.784 +05:30 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2025-01-09 00:00:28.784 +05:30 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2025-01-09 00:00:28.786 +05:30 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter' and content type 'application/json' to write the response. +2025-01-09 00:00:28.786 +05:30 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType0`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. +2025-01-09 00:00:28.839 +05:30 [INF] Executed action Service.Controllers.ShortnerController.ShortenUrl (Service) in 3572.0652ms +2025-01-09 00:00:28.840 +05:30 [INF] Executed endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-09 00:00:28.846 +05:30 [DBG] 'QuickDbContext' disposed. +2025-01-09 00:00:28.851 +05:30 [DBG] Disposing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:00:28.853 +05:30 [DBG] Disposed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (1ms). +2025-01-09 00:00:28.854 +05:30 [INF] Request finished HTTP/2 POST https://localhost:7297/quickurl - 200 54 application/json; charset=utf-8 3666.7621ms +2025-01-09 00:27:01.826 +05:30 [DBG] Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DateTimeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.TryParseModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider","Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexObjectModelBinderProvider"] +2025-01-09 00:27:02.037 +05:30 [DBG] Hosting starting +2025-01-09 00:27:02.753 +05:30 [DBG] Middleware configuration started with options: {AllowedHosts = *, AllowEmptyHosts = True, IncludeFailureMessage = True} +2025-01-09 00:27:02.758 +05:30 [DBG] Wildcard detected, all requests with hosts will be allowed. +2025-01-09 00:27:02.862 +05:30 [INF] Now listening on: https://localhost:50875 +2025-01-09 00:27:02.863 +05:30 [INF] Now listening on: http://localhost:50876 +2025-01-09 00:27:02.863 +05:30 [DBG] Loaded hosting startup assembly Service +2025-01-09 00:27:02.863 +05:30 [DBG] Loaded hosting startup assembly Microsoft.WebTools.ApiEndpointDiscovery +2025-01-09 00:27:02.863 +05:30 [DBG] Loaded hosting startup assembly Microsoft.AspNetCore.Watch.BrowserRefresh +2025-01-09 00:27:02.863 +05:30 [DBG] Loaded hosting startup assembly Microsoft.WebTools.BrowserLink.Net +2025-01-09 00:27:02.872 +05:30 [DBG] Executing API description provider 'EndpointMetadataApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v9.0.0.0. +2025-01-09 00:27:02.873 +05:30 [DBG] Executing API description provider 'DefaultApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v9.0.0.0. +2025-01-09 00:27:02.878 +05:30 [DBG] Executing API description provider 'JsonPatchOperationsArrayProvider' from assembly Microsoft.AspNetCore.Mvc.NewtonsoftJson v9.0.0.0. +2025-01-09 00:27:02.920 +05:30 [INF] Application started. Press Ctrl+C to shut down. +2025-01-09 00:27:02.920 +05:30 [INF] Hosting environment: Development +2025-01-09 00:27:02.921 +05:30 [INF] Content root path: C:\Users\extinctsion\Desktop\New folder\quick-backend\Service +2025-01-09 00:27:02.921 +05:30 [DBG] Hosting started +2025-01-09 00:27:11.753 +05:30 [DBG] Connection id "0HN9G2P161DMD" accepted. +2025-01-09 00:27:11.760 +05:30 [DBG] Connection id "0HN9G2P161DMD" started. +2025-01-09 00:27:11.780 +05:30 [DBG] Connection 0HN9G2P161DMD established using the following protocol: "Tls12" +2025-01-09 00:27:12.067 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.html - null null +2025-01-09 00:27:12.190 +05:30 [DBG] Response markup is scheduled to include Browser Link script injection. +2025-01-09 00:27:12.191 +05:30 [DBG] Response markup is scheduled to include browser refresh script injection. +2025-01-09 00:27:12.201 +05:30 [DBG] Response markup was updated to include Browser Link script injection. +2025-01-09 00:27:12.203 +05:30 [DBG] Response markup was updated to include browser refresh script injection. +2025-01-09 00:27:12.207 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.html - 200 null text/html;charset=utf-8 156.2365ms +2025-01-09 00:27:12.247 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/index.js - null null +2025-01-09 00:27:12.248 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - null null +2025-01-09 00:27:12.255 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/index.js - 200 null application/javascript;charset=utf-8 7.6063ms +2025-01-09 00:27:12.267 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_framework/aspnetcore-browser-refresh.js - 200 13766 application/javascript; charset=utf-8 18.4653ms +2025-01-09 00:27:12.364 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/_vs/browserLink - null null +2025-01-09 00:27:12.404 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/_vs/browserLink - 200 null text/javascript; charset=UTF-8 40.3587ms +2025-01-09 00:27:12.485 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - null null +2025-01-09 00:27:12.499 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/swagger/v1/swagger.json - 200 null application/json;charset=utf-8 13.4699ms +2025-01-09 00:27:31.310 +05:30 [INF] Request starting HTTP/2 POST https://localhost:7297/ - application/json-patch+json 66 +2025-01-09 00:27:31.312 +05:30 [DBG] POST requests are not supported +2025-01-09 00:27:31.314 +05:30 [INF] No CORS policy found for the specified request. +2025-01-09 00:27:31.338 +05:30 [DBG] 1 candidate(s) found for the request path '/' +2025-01-09 00:27:31.339 +05:30 [DBG] Endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' with route pattern '' is valid for the request path '/' +2025-01-09 00:27:31.340 +05:30 [DBG] Request matched endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-09 00:27:31.346 +05:30 [INF] Executing endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-09 00:27:31.365 +05:30 [INF] Route matched with {action = "ShortenUrl", controller = "Shortner"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] ShortenUrl(System.String) on controller Service.Controllers.ShortnerController (Service). +2025-01-09 00:27:31.368 +05:30 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2025-01-09 00:27:31.369 +05:30 [DBG] Execution plan of resource filters (in the following order): ["None"] +2025-01-09 00:27:31.370 +05:30 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2025-01-09 00:27:31.370 +05:30 [DBG] Execution plan of exception filters (in the following order): ["None"] +2025-01-09 00:27:31.370 +05:30 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2025-01-09 00:27:31.374 +05:30 [DBG] Executing controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-09 00:27:31.927 +05:30 [DBG] An 'IServiceProvider' was created for internal use by Entity Framework. +2025-01-09 00:27:31.946 +05:30 [DBG] Executed controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-09 00:27:31.956 +05:30 [DBG] Attempting to bind parameter 'originalUrl' of type 'System.String' ... +2025-01-09 00:27:31.960 +05:30 [DBG] Attempting to bind parameter 'originalUrl' of type 'System.String' using the name '' in request data ... +2025-01-09 00:27:31.961 +05:30 [DBG] Rejected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonPatchInputFormatter' for content type 'application/json-patch+json'. +2025-01-09 00:27:31.962 +05:30 [DBG] Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter' for content type 'application/json-patch+json'. +2025-01-09 00:27:31.972 +05:30 [DBG] Connection id "0HN9G2P161DMD", Request id "0HN9G2P161DMD:0000000B": started reading request body. +2025-01-09 00:27:31.972 +05:30 [DBG] Connection id "0HN9G2P161DMD", Request id "0HN9G2P161DMD:0000000B": done reading request body. +2025-01-09 00:27:32.007 +05:30 [DBG] Done attempting to bind parameter 'originalUrl' of type 'System.String'. +2025-01-09 00:27:32.008 +05:30 [DBG] Done attempting to bind parameter 'originalUrl' of type 'System.String'. +2025-01-09 00:27:32.009 +05:30 [DBG] Attempting to validate the bound parameter 'originalUrl' of type 'System.String' ... +2025-01-09 00:27:32.014 +05:30 [DBG] Done attempting to validate the bound parameter 'originalUrl' of type 'System.String'. +2025-01-09 00:27:32.019 +05:30 [INF] Executing action method Service.Controllers.ShortnerController.ShortenUrl (Service) - Validation state: "Valid" +2025-01-09 00:27:32.543 +05:30 [DBG] Entity Framework Core 9.0.0 initialized 'QuickDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:9.0.2+697dd7182173ff3450eddc63b44837fba76331df' with options: None +2025-01-09 00:27:32.586 +05:30 [DBG] 'QuickDbContext' generated a temporary value for the property 'Shortner.Id'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-09 00:27:32.634 +05:30 [DBG] Context 'QuickDbContext' started tracking 'Shortner' entity. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-09 00:27:32.638 +05:30 [DBG] SaveChanges starting for 'QuickDbContext'. +2025-01-09 00:27:32.646 +05:30 [DBG] DetectChanges starting for 'QuickDbContext'. +2025-01-09 00:27:32.658 +05:30 [DBG] DetectChanges completed for 'QuickDbContext'. +2025-01-09 00:27:32.761 +05:30 [DBG] Creating DbConnection. +2025-01-09 00:27:32.799 +05:30 [DBG] Created DbConnection. (36ms). +2025-01-09 00:27:32.803 +05:30 [DBG] Opening connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:34.736 +05:30 [DBG] Opened connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:34.744 +05:30 [DBG] Creating DbCommand for 'ExecuteReader'. +2025-01-09 00:27:34.751 +05:30 [DBG] Created DbCommand for 'ExecuteReader' (4ms). +2025-01-09 00:27:34.758 +05:30 [DBG] Initialized DbCommand for 'ExecuteReader' (12ms). +2025-01-09 00:27:34.765 +05:30 [DBG] Executing DbCommand [Parameters=[@p0='?' (DbType = DateTime), @p1='?', @p2='?' (DbType = DateTime), @p3='?'], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO "Shortner" ("CreatedAt", "GeneratedKey", "LastUpdatedAt", "URL") +VALUES (@p0, @p1, @p2, @p3) +RETURNING "Id"; +2025-01-09 00:27:35.052 +05:30 [INF] Executed DbCommand (286ms) [Parameters=[@p0='?' (DbType = DateTime), @p1='?', @p2='?' (DbType = DateTime), @p3='?'], CommandType='"Text"', CommandTimeout='30'] +INSERT INTO "Shortner" ("CreatedAt", "GeneratedKey", "LastUpdatedAt", "URL") +VALUES (@p0, @p1, @p2, @p3) +RETURNING "Id"; +2025-01-09 00:27:35.073 +05:30 [DBG] The foreign key property 'Shortner.Id' was detected as changed. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see property values. +2025-01-09 00:27:35.081 +05:30 [DBG] Closing data reader to 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:35.088 +05:30 [DBG] A data reader for 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' is being disposed after spending 32ms reading results. +2025-01-09 00:27:35.094 +05:30 [DBG] Closing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:35.098 +05:30 [DBG] Closed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (4ms). +2025-01-09 00:27:35.109 +05:30 [DBG] An entity of type 'Shortner' tracked by 'QuickDbContext' changed state from '"Added"' to '"Unchanged"'. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see key values. +2025-01-09 00:27:35.111 +05:30 [DBG] SaveChanges completed for 'QuickDbContext' with 1 entities written to the database. +2025-01-09 00:27:35.116 +05:30 [INF] Executed action method Service.Controllers.ShortnerController.ShortenUrl (Service), returned result Microsoft.AspNetCore.Mvc.OkObjectResult in 3094.3955ms. +2025-01-09 00:27:35.120 +05:30 [DBG] List of registered output formatters, in the following order: ["Microsoft.AspNetCore.Mvc.Formatters.HttpNoContentOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StringOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.StreamOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter","Microsoft.AspNetCore.Mvc.Formatters.XmlDataContractSerializerOutputFormatter"] +2025-01-09 00:27:35.123 +05:30 [DBG] No information found on request to perform content negotiation. +2025-01-09 00:27:35.123 +05:30 [DBG] Attempting to select an output formatter without using a content type as no explicit content types were specified for the response. +2025-01-09 00:27:35.123 +05:30 [DBG] Attempting to select the first formatter in the output formatters list which can write the result. +2025-01-09 00:27:35.125 +05:30 [DBG] Selected output formatter 'Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonOutputFormatter' and content type 'application/json' to write the response. +2025-01-09 00:27:35.126 +05:30 [INF] Executing OkObjectResult, writing value of type '<>f__AnonymousType0`1[[System.String, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. +2025-01-09 00:27:35.186 +05:30 [INF] Executed action Service.Controllers.ShortnerController.ShortenUrl (Service) in 3812.5605ms +2025-01-09 00:27:35.187 +05:30 [INF] Executed endpoint 'Service.Controllers.ShortnerController.ShortenUrl (Service)' +2025-01-09 00:27:35.194 +05:30 [DBG] 'QuickDbContext' disposed. +2025-01-09 00:27:35.200 +05:30 [DBG] Disposing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:35.202 +05:30 [DBG] Disposed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (1ms). +2025-01-09 00:27:35.203 +05:30 [INF] Request finished HTTP/2 POST https://localhost:7297/ - 200 46 application/json; charset=utf-8 3892.4904ms +2025-01-09 00:27:46.164 +05:30 [INF] Request starting HTTP/2 GET https://localhost:7297/aa49c68b - null null +2025-01-09 00:27:46.174 +05:30 [DBG] The request path does not match the path filter +2025-01-09 00:27:46.179 +05:30 [DBG] 1 candidate(s) found for the request path '/aa49c68b' +2025-01-09 00:27:46.179 +05:30 [DBG] Endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' with route pattern '{key}' is valid for the request path '/aa49c68b' +2025-01-09 00:27:46.180 +05:30 [DBG] Request matched endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-09 00:27:46.180 +05:30 [INF] Executing endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-09 00:27:46.191 +05:30 [INF] Route matched with {action = "RedirectUrl", controller = "Shortner"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] RedirectUrl(System.String) on controller Service.Controllers.ShortnerController (Service). +2025-01-09 00:27:46.192 +05:30 [DBG] Execution plan of authorization filters (in the following order): ["None"] +2025-01-09 00:27:46.192 +05:30 [DBG] Execution plan of resource filters (in the following order): ["None"] +2025-01-09 00:27:46.192 +05:30 [DBG] Execution plan of action filters (in the following order): ["Microsoft.AspNetCore.Mvc.ModelBinding.UnsupportedContentTypeFilter (Order: -3000)","Microsoft.AspNetCore.Mvc.Infrastructure.ModelStateInvalidFilter (Order: -2000)"] +2025-01-09 00:27:46.192 +05:30 [DBG] Execution plan of exception filters (in the following order): ["None"] +2025-01-09 00:27:46.193 +05:30 [DBG] Execution plan of result filters (in the following order): ["Microsoft.AspNetCore.Mvc.Infrastructure.ClientErrorResultFilter (Order: -2000)"] +2025-01-09 00:27:46.193 +05:30 [DBG] Executing controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-09 00:27:46.194 +05:30 [DBG] Executed controller factory for controller Service.Controllers.ShortnerController (Service) +2025-01-09 00:27:46.195 +05:30 [DBG] Attempting to bind parameter 'key' of type 'System.String' ... +2025-01-09 00:27:46.195 +05:30 [DBG] Attempting to bind parameter 'key' of type 'System.String' using the name 'key' in request data ... +2025-01-09 00:27:46.196 +05:30 [DBG] Done attempting to bind parameter 'key' of type 'System.String'. +2025-01-09 00:27:46.197 +05:30 [DBG] Done attempting to bind parameter 'key' of type 'System.String'. +2025-01-09 00:27:46.197 +05:30 [DBG] Attempting to validate the bound parameter 'key' of type 'System.String' ... +2025-01-09 00:27:46.198 +05:30 [DBG] Done attempting to validate the bound parameter 'key' of type 'System.String'. +2025-01-09 00:27:46.198 +05:30 [INF] Executing action method Service.Controllers.ShortnerController.RedirectUrl (Service) - Validation state: "Valid" +2025-01-09 00:27:46.278 +05:30 [DBG] Entity Framework Core 9.0.0 initialized 'QuickDbContext' using provider 'Npgsql.EntityFrameworkCore.PostgreSQL:9.0.2+697dd7182173ff3450eddc63b44837fba76331df' with options: None +2025-01-09 00:27:46.332 +05:30 [DBG] Compiling query expression: +'DbSet() + .Where(u => u.GeneratedKey == __key_0) + .Select(u => u.URL) + .FirstOrDefault()' +2025-01-09 00:27:46.582 +05:30 [DBG] Generated query execution expression: +'queryContext => ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync( + asyncEnumerable: SingleQueryingEnumerable.Create( + relationalQueryContext: (RelationalQueryContext)queryContext, + relationalCommandResolver: parameters => [LIFTABLE Constant: RelationalCommandCache.QueryExpression( + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT TOP(1) s.URL + FROM Shortner AS s + WHERE s.GeneratedKey == @__key_0) | Resolver: c => new RelationalCommandCache( + c.Dependencies.MemoryCache, + c.RelationalDependencies.QuerySqlGeneratorFactory, + c.RelationalDependencies.RelationalParameterBasedSqlProcessorFactory, + Projection Mapping: + EmptyProjectionMember -> 0 + SELECT TOP(1) s.URL + FROM Shortner AS s + WHERE s.GeneratedKey == @__key_0, + False, + new HashSet( + new string[]{ }, + StringComparer.Ordinal + ) + )].GetRelationalCommandTemplate(parameters), + readerColumns: null, + shaper: (queryContext, dataReader, resultContext, resultCoordinator) => + { + string value1; + value1 = dataReader.IsDBNull(0) ? default(string) : dataReader.GetString(0); + return value1; + }, + contextType: Data.QuickDb.QuickDbContext, + standAloneStateManager: False, + detailedErrorsEnabled: False, + threadSafetyChecksEnabled: True), + cancellationToken: queryContext.CancellationToken)' +2025-01-09 00:27:46.634 +05:30 [DBG] Creating DbConnection. +2025-01-09 00:27:46.635 +05:30 [DBG] Created DbConnection. (0ms). +2025-01-09 00:27:46.635 +05:30 [DBG] Opening connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:46.635 +05:30 [DBG] Opened connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:46.636 +05:30 [DBG] Creating DbCommand for 'ExecuteReader'. +2025-01-09 00:27:46.636 +05:30 [DBG] Created DbCommand for 'ExecuteReader' (0ms). +2025-01-09 00:27:46.636 +05:30 [DBG] Initialized DbCommand for 'ExecuteReader' (0ms). +2025-01-09 00:27:46.636 +05:30 [DBG] Executing DbCommand [Parameters=[@__key_0='?'], CommandType='"Text"', CommandTimeout='30'] +SELECT s."URL" +FROM "Shortner" AS s +WHERE s."GeneratedKey" = @__key_0 +LIMIT 1 +2025-01-09 00:27:46.852 +05:30 [INF] Executed DbCommand (215ms) [Parameters=[@__key_0='?'], CommandType='"Text"', CommandTimeout='30'] +SELECT s."URL" +FROM "Shortner" AS s +WHERE s."GeneratedKey" = @__key_0 +LIMIT 1 +2025-01-09 00:27:46.863 +05:30 [DBG] Closing data reader to 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:46.865 +05:30 [DBG] A data reader for 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' is being disposed after spending 13ms reading results. +2025-01-09 00:27:46.865 +05:30 [DBG] Closing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:46.865 +05:30 [DBG] Closed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (0ms). +2025-01-09 00:27:46.866 +05:30 [INF] Executed action method Service.Controllers.ShortnerController.RedirectUrl (Service), returned result Microsoft.AspNetCore.Mvc.RedirectResult in 668.054ms. +2025-01-09 00:27:46.870 +05:30 [INF] Executing RedirectResult, redirecting to https://www.shorturl.at/url-total-clicks.php?u=shorturl.at/eBbD3. +2025-01-09 00:27:46.871 +05:30 [INF] Executed action Service.Controllers.ShortnerController.RedirectUrl (Service) in 677.61ms +2025-01-09 00:27:46.871 +05:30 [INF] Executed endpoint 'Service.Controllers.ShortnerController.RedirectUrl (Service)' +2025-01-09 00:27:46.871 +05:30 [DBG] 'QuickDbContext' disposed. +2025-01-09 00:27:46.872 +05:30 [DBG] Disposing connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432'. +2025-01-09 00:27:46.872 +05:30 [DBG] Disposed connection to database 'postgres' on server 'tcp://org-extinctsion-inst-quickurl.data-1.use1.tembo.io:5432' (0ms). +2025-01-09 00:27:46.872 +05:30 [INF] Request finished HTTP/2 GET https://localhost:7297/aa49c68b - 302 0 null 708.4582ms diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj new file mode 100644 index 0000000..9135b1c --- /dev/null +++ b/Tests/Tests.csproj @@ -0,0 +1,21 @@ + + + + net9.0 + enable + enable + false + + + + + + + + + + + + + + diff --git a/Tests/UnitTest1.cs b/Tests/UnitTest1.cs new file mode 100644 index 0000000..3946bd7 --- /dev/null +++ b/Tests/UnitTest1.cs @@ -0,0 +1,11 @@ +namespace Tests +{ + public class UnitTest1 + { + [Fact] + public void Test1() + { + // first unit tests + } + } +}