trycatchlearn / datingapp_2.2_archive Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
My code is almost same as yours but it seems my MapSpaFallbackRoute is not working. Everything else is fine. My dotnet version is 2.2.100 . It says This page isn’t working. Http error 401
This is my repository: https://github.com/trktuhin/Audible-Helper
Dear Neil : After add this.galleryImages=this.getImages(); you have added in your answer , my photo still cannot show any photos and does not show any error. could you have a peek for my code ? Thank you best regards. https://github.com/caihua2400/DatingApp-SPA this is my code link.
C:\Users\Web\Documents\KICApp\KICApp.API>dotnet watch run
watch : Started
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using 'C:\Users\Web\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
Hosting environment: Production
Content root path: C:\Users\Web\Documents\KICApp\KICApp.API
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
Request starting HTTP/1.1 GET http://localhost:5000/
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLU8RV9NA7T6", Request id "0HLU8RV9NA7T6:00000001": An unhandled exception was thrown by the application.
System.ArgumentNullException: String reference not set to an instance of a String.
Parameter name: s
at System.Text.Encoding.GetBytes(String s)
at KICApp.API.Startup.b__4_1(JwtBearerOptions options) in C:\Users\Web\Documents\KICApp\KICApp.API\Startup.cs:line 39
at Microsoft.Extensions.Options.ConfigureNamedOptions1.Configure(String name, TOptions options) at Microsoft.Extensions.Options.OptionsFactory
1.Create(String name)
at Microsoft.Extensions.Options.OptionsMonitor1.<>c__DisplayClass10_0.<Get>b__0() at System.Lazy
1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy
1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func
1 createOptions)
at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 92.783ms 500 info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 GET http://localhost:5000/api/auth fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLU8RV9NA7T7", Request id "0HLU8RV9NA7T7:00000001": An unhandled exception was thrown by the application. System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s at System.Text.Encoding.GetBytes(String s) at KICApp.API.Startup.<ConfigureServices>b__4_1(JwtBearerOptions options) in C:\Users\Web\Documents\KICApp\KICApp.API\Startup.cs:line 39 at Microsoft.Extensions.Options.ConfigureNamedOptions
1.Configure(String name, TOptions options)
at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c__DisplayClass10_0.b__0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location where exception was thrown --- at System.Lazy
1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func
1 createOptions)
at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 7.1011ms 500 info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 GET http://localhost:5000/api/values info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4] CORS policy execution successful. fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLU8RV9NA7T8", Request id "0HLU8RV9NA7T8:00000001": An unhandled exception was thrown by the application. System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s at System.Text.Encoding.GetBytes(String s) at KICApp.API.Startup.<ConfigureServices>b__4_1(JwtBearerOptions options) in C:\Users\Web\Documents\KICApp\KICApp.API\Startup.cs:line 39 at Microsoft.Extensions.Options.ConfigureNamedOptions
1.Configure(String name, TOptions options)
at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c__DisplayClass10_0.b__0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location where exception was thrown --- at System.Lazy
1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func
1 createOptions)
at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 84.1123ms 500 info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 OPTIONS http://localhost:5000/api/auth/login info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4] CORS policy execution successful. info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 9.005ms 204 info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 POST http://localhost:5000/api/auth/login application/json 45 info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4] CORS policy execution successful. fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLU8RV9NA7T9", Request id "0HLU8RV9NA7T9:00000002": An unhandled exception was thrown by the application. System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s at System.Text.Encoding.GetBytes(String s) at KICApp.API.Startup.<ConfigureServices>b__4_1(JwtBearerOptions options) in C:\Users\Web\Documents\KICApp\KICApp.API\Startup.cs:line 39 at Microsoft.Extensions.Options.ConfigureNamedOptions
1.Configure(String name, TOptions options)
at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c__DisplayClass10_0.b__0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location where exception was thrown --- at System.Lazy
1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func
1 createOptions)
at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 6.4734ms 500 info: Microsoft.AspNetCore.Server.Kestrel[32] Connection id "0HLU8RV9NA7T9", Request id "0HLU8RV9NA7T9:00000002": the application completed without reading the entire request body. info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 POST http://localhost:5000/api/auth/login application/json 45 info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4] CORS policy execution successful. fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLU8RV9NA7TA", Request id "0HLU8RV9NA7TA:00000001": An unhandled exception was thrown by the application. System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s at System.Text.Encoding.GetBytes(String s) at KICApp.API.Startup.<ConfigureServices>b__4_1(JwtBearerOptions options) in C:\Users\Web\Documents\KICApp\KICApp.API\Startup.cs:line 39 at Microsoft.Extensions.Options.ConfigureNamedOptions
1.Configure(String name, TOptions options)
at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c__DisplayClass10_0.b__0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location where exception was thrown --- at System.Lazy
1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func
1 createOptions)
at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 4.7174ms 500 info: Microsoft.AspNetCore.Server.Kestrel[32] Connection id "0HLU8RV9NA7TA", Request id "0HLU8RV9NA7TA:00000001": the application completed without reading the entire request body. info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 POST http://localhost:5000/api/auth/login application/json 45 info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4] CORS policy execution successful. fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLU8RV9NA7TA", Request id "0HLU8RV9NA7TA:00000002": An unhandled exception was thrown by the application. System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s at System.Text.Encoding.GetBytes(String s) at KICApp.API.Startup.<ConfigureServices>b__4_1(JwtBearerOptions options) in C:\Users\Web\Documents\KICApp\KICApp.API\Startup.cs:line 39 at Microsoft.Extensions.Options.ConfigureNamedOptions
1.Configure(String name, TOptions options)
at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c__DisplayClass10_0.b__0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location where exception was thrown --- at System.Lazy
1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func
1 createOptions)
at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 5.3827ms 500 info: Microsoft.AspNetCore.Server.Kestrel[32] Connection id "0HLU8RV9NA7TA", Request id "0HLU8RV9NA7TA:00000002": the application completed without reading the entire request body. info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 OPTIONS http://localhost:5000/api/auth/login info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4] CORS policy execution successful. info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 0.6076ms 204 info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 POST http://localhost:5000/api/auth/login application/json 45 info: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[4] CORS policy execution successful. fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLU8RV9NA7TA", Request id "0HLU8RV9NA7TA:00000004": An unhandled exception was thrown by the application. System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s at System.Text.Encoding.GetBytes(String s) at KICApp.API.Startup.<ConfigureServices>b__4_1(JwtBearerOptions options) in C:\Users\Web\Documents\KICApp\KICApp.API\Startup.cs:line 39 at Microsoft.Extensions.Options.ConfigureNamedOptions
1.Configure(String name, TOptions options)
at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor
1.<>c__DisplayClass10_0.b__0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location where exception was thrown --- at System.Lazy
1.CreateValue()
at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func
1 createOptions)
at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.InitializeAsync(AuthenticationScheme scheme, HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.GetHandlerAsync(HttpContext context, String authenticationScheme)
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 4.3819ms 500
info: Microsoft.AspNetCore.Server.Kestrel[32]
Connection id "0HLU8RV9NA7TA", Request id "0HLU8RV9NA7TA:00000004": the application completed without reading the entire request body.
it looks like i'm doing everythin exactly the same but i get this error in postman
System.InvalidOperationException: Cannot find the fallback endpoint specified by route values: { action: Index, controller: Fallback, area: }.
at Microsoft.AspNetCore.Mvc.Routing.DynamicControllerEndpointMatcherPolicy.ApplyAsync(HttpContext httpContext, CandidateSet candidates)
at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
Cache-Control: no-cache
Connection: keep-alive
Accept: /
Accept-Encoding: gzip, deflate, br
Host: localhost:5000
User-Agent: PostmanRuntime/7.24.0
Content-Length: 0
Postman-Token: ad33ac65-58b7-434e-a4e0-81906c40fbde
How to properly install and configure it, as well as implement support for external authentication/authorization providers such as Google, Facebook
Hello sir, I've been watching your videos for almost 2 months now and I have a problem in understanding a part of it and I didn't know anywhere else to ask it.
In Module 12 Episode 10, you assign an object from the register form to an empty object which will be cloned and mapped to the user property in the register component class. (2:38 of the episode).
So my question is, we don't have a dateOfBirth Property inside the user model in spa but the value that comes from the register form does and is assigned to the user and then is being sent up to the API and there seems to be nothing wrong with this. Could you shine a light on this matter please? thanks
this.user = Object.assign({}, this.registerForm.value);
ERROR in src/app/messages/messages.component.html(28,44): This condition will always return 'false' since the types '"Unread"' and '"Outbox"' have no overlap.
src/app/messages/messages.component.html(32,16): This condition will always return 'true' since the types '"Unread"' and '"Outbox"' have no overlap.
src/app/messages/messages.component.html(36,16): This condition will always return 'false' since the types '"Unread"' and '"Outbox"' have no overlap.
ERROR in node_modules/ngx-gallery/ngx-gallery-helper.service.d.ts:1:22 - error TS2724: Module '"../../../../../../Angular9/NeilCumming/DatingAppTwo/DatingApp-SPA/node_modules/@angular/core/core"' has no exported member 'Renderer'. Did you mean 'Renderer2'?
1 import { ElementRef, Renderer } from '@angular/core';
~~~~~~~~
node_modules/@angular/core/core.d.ts:5740:31
5740 export declare abstract class Renderer2 {
~~~~~~~~~
'Renderer2' is declared here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.