Well done. I like the way you present the material. Quite helpful in gathering my notes for an upcoming 2.2 to 3.1 conversion project. The integration test notes were very interesting. Thanks
@rodmcbride91655 жыл бұрын
Great series Nick and it awesome to see you included the bits about JWT, Integration Testing and Migrating to .NET Core 3.0. Keep up the great work and keep coding!
5 жыл бұрын
Absolutely amazing videos. Please continue in this deep netcore v3 knowledge transfer
@AntoNosu4 жыл бұрын
The AddEntityFrameWorkStores Method on the IdentityBuilder does not exist for me, do you know how to fix that? or what it's been replaced with. I cant find anything online EDIT: I found it in the package "Microsoft.Extensions.Identity.Core" For anyone with the same issue :)
@michaelm52785 жыл бұрын
Hej Nick. First of all, great series! When running the tests i get an "UnsupportedMediaTypeException" with the description: No MediaTypeFormatter is available to read an object of type 'AuthSuccessResponse' from content with media type 'text/plain' It complains about the method called AuthenticateAsync and more specifically this line: var registrationResponse = await response.Content.ReadAsAsync(); Any suggestions how to fix this? I have tried downloading your project from github, but i get the same error.
@ketelsb5 жыл бұрын
Hello Michael. I had the same issue. Have you checked that you updated all your nuget assemblies to the latest preview version? Check my post above about the nightly builds to get the latest ones. If you don't see the preview builds in Visual Studio, go to Tools->Options, General -> Preview Features and check the "Use previews of the .NET Core SDK" checkbox. This checkbox has been moved to this location recently. When you open the NuGet UI, make sure you also check the checkbox "Include prerelease". Update the assemblies in the Tweetbook project and also in the IntegrationTests project.
@silverciri13795 жыл бұрын
have tested with preview 9, still doesn't fix the "UnsupportedMediaTypeException" problem.
@michaelm52785 жыл бұрын
@@ketelsb Hi, ive tried what you suggested, but i still get the same error. Sure you didnt do anything else to fix this issue?
@michaelm52785 жыл бұрын
@@ketelsb Wait a minute, the method AuthenticateAsync works now, but instead i get the same error when calling the method CreatePostAsync (defined in the base test class as in the video).
@ketelsb5 жыл бұрын
@@michaelm5278 I know I had that same issue, but I don't exactly know how I fixed it... Maybe it helps to provide you with the nuget packages/versions I used? I will try to recreate the situation. Maybe I will remember how I fixed it... FluentAssertions 5.9.0 Microsoft.AspNet.WebApi.Client 5.2.7 Microsoft.AspNetCore.Mvc.Testing 3.0.0-preview9.19424.4 Microsoft.EntityFrameworkCore.InMemory 3.0.0-preview9.19423.6 Microsoft.NET.Test.Sdk 16.3.0-preview-20190828-03 xunit 2.4.1 xunit.runner.visualstudio 2.4.1
@ishaqsalamdwicahyo17014 жыл бұрын
Great tutorial, but i getting error in PostsControllerTests file at every word "Should", for excample "response.StatusCode.Should().Be(HttpStatusCode.OK);" and description of error is 'HttpStatusCode' does not contain a definition for 'Should' and no accessible extension method 'Should' accepting a first argument of type 'HttpStatusCode' could be found (are you missing a using directive or an assembly reference?) what should i do?
@mihaimyh5 жыл бұрын
Thank you for your efforts on creating these videos. Is there a way to handle authorization in dotnet core 3? Can you create a video for this? I know there is role and policies based authorizations but I don't know exactly how to integrated them withing API?
@nickchapsas5 жыл бұрын
I already have a video on this in my series, you can find that here: kzbin.info/www/bejne/g2eknJV4lql6gKc . Even though it said 2.2 the code should be identical in 3.
@ksutine5 жыл бұрын
Great video, very helpful. With dotnet Core 3.0 officially out, and dependency to NewtonsoftJson removed, what changes should be done to Swagger Examples? The latest Swashbuckle.AspNetCore.Filters still has NewtonsoftJson dependency, and for me the Examples don't show in CamelCase anymore, even though the scheme has them right, and the response comes correctly.
@loveandladles5 жыл бұрын
I am getting error Could not load type "Microsoft.AspNetCore.MvcJsonOptions" from assembly "Microdoft.AspNetCore.Mvc.Formatters.Json" when migrating from 2.1 to 3.0. Could you please help ?
@haozhang62475 жыл бұрын
Man you are soooo goooooood!!
@CarlosHerreraJugovie5 жыл бұрын
Hello, Excellent video, one question: how do you do to have that theme in the visual studio IDE? thanks
@nickchapsas5 жыл бұрын
This isn't a theme. This is a different IDE called Jetbrains Rider.
@CarlosHerreraJugovie4 жыл бұрын
@@nickchapsas Thanks dude..!!!
@ketelsb5 жыл бұрын
When upgrading to core 3 preview 8, I had issues when the Integration tests gave nullreference exceptions on the FindByEmailAsync method of the UserManager when it was used in the InMemory mode. After some research I came to this article, explaining that the issue was present in preview 6 and was still not fixed in preview 8. However, it is fixed in preview 9 nightly builds. github.com/aspnet/EntityFrameworkCore/issues/16099 Here is information on how to configure nuget to use the nightly builds: github.com/aspnet/AspNetCore/blob/master/docs/DailyBuilds.md Enjoy!
@nickchapsas5 жыл бұрын
Hey Bravo, I explicitly said that in the video. The issue you linked was the very reason. Thanks for the detailed comment.
@qnill125 жыл бұрын
Hi Nick, Thanks for videos. I upgraded my project from version 2.2 to version 3.0. I keep the installer files like you in separate classes. But when I write the code "options.EnableEndpointRouting = false" to the "MVCInstaller" class, "app.UseMvc ()" in startup.cs code is running, but the warning continues to appear. But when I write the code into "startup.cs" instead of the "MVCInstaller" class warning I'm not getting an error. I wonder why ?
@ian2neko5 жыл бұрын
Tested still works in 3.1 BUT as of today (2020-01-16) with 3.1.1 updates, suddenly there is a runtime error "Could not load file or assembly 'Microsoft.AspNetCore.Razor.Runtime, Version=3.1.1.0". And Razor.Runtime v3.1.1 doesn't even exist.
@maghameghomaghamegho86155 жыл бұрын
Im getting the following error message TypeError: Failed to execute 'fetch' on 'Window' once I add [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] on the Post controller .. so what is it mean and how can I solve it? Thank u in advance :)
@patrikfajnar65685 жыл бұрын
I just realized after I migrated the project I couldn't connect to my api from other device in the network. If i migrate it back it works again. What is causing this problem? Can you help me?
@nickchapsas5 жыл бұрын
Did you do the AddMvc change for the routing?
@patrikfajnar65685 жыл бұрын
@@nickchapsas Yes, I did. Neither yours nor mine worked for me. I added my ip address to the app urls and my firewall doesn't block my chosen port. It works on ASP.NET 2.2. I replaced WebHostBuilder to HostBuilder too as this say: docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-2.2&tabs=visual-studio#hostbuilder-replaces-webhostbuilder
@nickchapsas5 жыл бұрын
@@patrikfajnar6568 Can you download the repo from the description and see if that works?
@patrikfajnar65685 жыл бұрын
@@nickchapsas I've just tried your version it doesn't work for me. My other device say: connection timed out.
@patrikfajnar65685 жыл бұрын
Is this work for anyone?
@lovethynatures5 жыл бұрын
i cpuld not see the video clearly
@nickchapsas5 жыл бұрын
Did you try increasing the quality to 1080p and setting it on full-screen?