ticketsbasket icon indicating copy to clipboard operation
ticketsbasket copied to clipboard

continuation

Open bartvanhoey opened this issue 5 years ago • 40 comments

Hello Ahmad, when will you continue on this course?

bartvanhoey avatar Dec 23 '20 21:12 bartvanhoey

Hi dear, I have already recorded many videos but didn't publish them yet because just waiting to finish my vacation so I continue publishing videos on daily bases, Starting from the new year you will see videos everyday and I will do my best to finish it in January and February Thanks for you interest

aksoftware98 avatar Dec 26 '20 13:12 aksoftware98

Hi Ahmad. This is a fantastic course. Much appreciated. Please continue.

lockhartsoftware avatar May 15 '21 21:05 lockhartsoftware

Hi dear Actually this course is still ongoing but the I found the number of viewers too less that expected but it seems there are people who are still interested like you, I will make sure to get back to you starting from this week thank you so much

aksoftware98 avatar May 16 '21 08:05 aksoftware98

Dear Ahmad,

Thank you so much.

This course is probably the most comprehensive course I have seen.

Many courses say that they will create a real world application but do not. Your course does. And your code works which sometimes isn’t the case with other courses and articles. You provide such detailed instructions. Thank you.

Your course will teach me about all the important technologies that I need to know to be an Azure cloud software developer. This is my dream. Thank you.

lockhartsoftware avatar May 16 '21 08:05 lockhartsoftware

After seeing this support I will make sure to continue working on it starting from tomorrow, stay tuned for all the new videos

Thanks for that support this is what I was waiting for, I tough no one is interested

aksoftware98 avatar May 16 '21 09:05 aksoftware98

For a long time now I read all the documents that I could find and I still didn’t get it. But your course brings it all together in a real world app: Blazor Wasm, SQL, CRUD, Authentication, Roles - there is nothing more I need to know for most applications.

I’m sorry I didn’t say this sooner to encourage you. Keep going. You’re doing a great job.

lockhartsoftware avatar May 16 '21 10:05 lockhartsoftware

Great work!

I should have completed all 36 videos by this evening.

I'm excited to see what's coming next. Hopefully, more videos and code to get me through the weekend :-)

lockhartsoftware avatar May 21 '21 08:05 lockhartsoftware

Hi Thanks for reminding Two videos are under cooking they will be available today

Thanks

aksoftware98 avatar May 21 '21 17:05 aksoftware98

Awesome. Thank you.

lockhartsoftware avatar May 21 '21 18:05 lockhartsoftware

The first video has been posted and stay tuned for others, thanks for your support

aksoftware98 avatar May 21 '21 23:05 aksoftware98

Thanks Ahmad. I look forward to watching.

lockhartsoftware avatar May 22 '21 09:05 lockhartsoftware

Hi Ahmad,

Thank you for continuing the course.

I had a productive weekend - I am now all up-to-date 👍

I look forward to seeing what's coming next, in particular, how you're going to integrate with Azure SignalR.

Thanks again.

Regards

lockhartsoftware avatar May 24 '21 19:05 lockhartsoftware

Thank you for that update The upcoming video will start with the events service to create an event and upload images and so on for the business owner, The integration with SignalR will be implemented after building the events and tickets service.

Stay tuned for the videos of this week

Thank You

aksoftware98 avatar May 24 '21 19:05 aksoftware98

Staying tuned.

lockhartsoftware avatar May 24 '21 19:05 lockhartsoftware

What’s cooking for this weekend 😀

lockhartsoftware avatar May 27 '21 07:05 lockhartsoftware

About 6 videos are getting ready to be published tomorrow and on Saturday

Thanks for you patience

aksoftware98 avatar May 27 '21 07:05 aksoftware98

Amazing. Thanks.

lockhartsoftware avatar May 27 '21 09:05 lockhartsoftware

Hi Ahmad,

I was thinking about how to automatically add the Azure AD B2C user to the local database table when the user completes the signup user flow.

I discovered this arcticle / code:

https://wellsb.com/csharp/aspnet/azure-ad-b2c-onticketreceived-newuser-claim/

Do you think that this would work with the TicketsBasket code that you have created as part of this training course?

I'd be interested to hear your comments / views on this.

Thanks.

lockhartsoftware avatar May 27 '21 12:05 lockhartsoftware

Actually that is something required, we have to do this but waiting to switch to the client-side part to figure out the best way to do it, sorry for not publishing videos this weekend but I was up to the new course there PlannerApp V2.0

There is some recorded videos for TicketsBasket that needs to be edited and uploaded

Thank you for sharing

aksoftware98 avatar May 31 '21 12:05 aksoftware98

No problem.

PlannerApp looks great too.

lockhartsoftware avatar May 31 '21 19:05 lockhartsoftware

Hi Ahmad,

I have successfully followed your video and implemented the CustomIdentityMiddleware.

I decided to add CustomIdentityMiddleware to another Blazor WebAssembly Hosted app that I have started to build - again, following your video instructions step-by-step.

Unfortunately, this time the CustomIdentityMiddleware is not reached, and, therefore the Role doesn't get added to the Claim.

I just can't seem to work out what I did wrong the second time around. Can you offer any suggestions or gotchas that you may have encountered when developing this sample app?

Here is my Configure section in Startup.cs:

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                //app.UseDeveloperExceptionPage();
                app.UseWebAssemblyDebugging();
            }
            else
            {
                //app.UseExceptionHandler("/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            app.UseHttpsRedirection();

            app.UseMiddleware<ErrorHandlingMiddleware>();

            app.UseBlazorFrameworkFiles();
            app.UseStaticFiles();

            app.UseRouting();

            app.UseAuthentication();
            app.UseMiddleware<CustomIdentityMiddleware>(); // Add the role claim.
            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapRazorPages();
                endpoints.MapControllers();
                endpoints.MapFallbackToFile("index.html");
            });
        }

And the CustomIdentityMiddleware:

    public class CustomIdentityMiddleware
    {
        private readonly RequestDelegate _next;
        public CustomIdentityMiddleware(RequestDelegate next)
        {
            _next = next;
        }

        public async Task InvokeAsync(HttpContext context, IUserProfilesService userProfilesService)
        {
            if (context.User.Identity.IsAuthenticated)
            {
                var userProfile = await userProfilesService.GetProfileByUserId();
                if (userProfile != null)
                {
                    string roleName = userProfile.IsHelper ? "Helper" : "Helped";
                    context.User.AddIdentity(new ClaimsIdentity(new Claim[] { new Claim(ClaimTypes.Role, roleName) }));
                }
            }

            await _next(context);
        }

    }

As you can see, I (hopefully) followed your instructions, step-by-step.

Kind Regards

lockhartsoftware avatar Jun 07 '21 21:06 lockhartsoftware

Hello

If you set a breakpoint, is getting hit or no?

aksoftware98 avatar Jun 08 '21 06:06 aksoftware98

Yes. I set a breakpoint within InvokeAsync. It’s not getting hit.

lockhartsoftware avatar Jun 08 '21 06:06 lockhartsoftware

It’s unusual.

lockhartsoftware avatar Jun 08 '21 06:06 lockhartsoftware

Okay then could you set a breakpoint in the ErrorHandlingMiddleware just to make sure that no error is getting thrown?

aksoftware98 avatar Jun 08 '21 07:06 aksoftware98

Just checked. No error is being thrown.

lockhartsoftware avatar Jun 08 '21 07:06 lockhartsoftware

This interesting is it possible for you to share the code with please on GitHub or somewhere so I can take look?

aksoftware98 avatar Jun 08 '21 08:06 aksoftware98

Thank you. That would be wonderful.

https://github.com/lockhartsoftware/Davos.HelpCareHero

lockhartsoftware avatar Jun 08 '21 08:06 lockhartsoftware

It seems nothing wrong with that the breakpoint is getting hit on my side

image

aksoftware98 avatar Jun 08 '21 08:06 aksoftware98

Thanks for looking. This is crazy. It's still not working for me.

lockhartsoftware avatar Jun 08 '21 08:06 lockhartsoftware