.NET 8 Blazor Rendering
16:03
2 ай бұрын
.NET 8 - HTTP Files
11:13
4 ай бұрын
.NET 8 FakeTimeProvider
15:12
5 ай бұрын
.NET 8 Testing Times
46:19
5 ай бұрын
.NET 8 Keyed Dependency Injection
16:34
C# 12 Primary Constructors
19:44
6 ай бұрын
ASP.NET Minimal API and Swagger
22:29
ASP.NET Minimal API Structure
25:11
ASP.NET Minimal API Performance
10:58
Blazor and JWT Refresh Tokens
16:07
ASP.NET and JWT Refresh Tokens
30:43
React and JWT
18:51
9 ай бұрын
Angular Logout
21:50
10 ай бұрын
Angular HTTP Interceptors
24:10
11 ай бұрын
More Swagger
14:28
Жыл бұрын
Swagger Versioning
17:50
Жыл бұрын
WebAPI Versioning
17:58
Жыл бұрын
ASP.NET Integration Testing
25:06
Жыл бұрын
ASP.NET and Swagger
21:08
Жыл бұрын
Blazor Pre-Rendering
24:51
Жыл бұрын
C# 11 and the Scope of Checked
10:33
C# 11 - List Patterns
17:29
Жыл бұрын
C# Flags Enum
12:35
Жыл бұрын
Пікірлер
@danstoian7721
@danstoian7721 2 күн бұрын
Awesome! thanks!
@hassanmohamed-iz2un
@hassanmohamed-iz2un 5 күн бұрын
The best video about delegates and events I have ever watched
@akeemaweda1716
@akeemaweda1716 5 күн бұрын
Sooooo clear. Thanks a lot for this.
@akeemaweda1716
@akeemaweda1716 5 күн бұрын
Many thanks for this wonderful clarification. Now I under the entire record, struct concepts.
@jphvnet
@jphvnet 6 күн бұрын
Finally cs gets c++ style hard to read when talking about optimized code... Nice
@mihailpeykov
@mihailpeykov 7 күн бұрын
All was good and informative up to the point you implement the "fast" parser using spans. That one was not good. You don't need to copy each number's characters to a stack allocated buffer just to pass them to double.Parse(Span<char>) - you could just do it with spans pointing inside the original string. That would avoid the risks of stack overflow you mentioned and will be slightly faster.
@foudilbenouci482
@foudilbenouci482 10 күн бұрын
Why the 'Model' column is nullable in the database whereas the property is declared as non nullable in the Motocar class ? 10:30 thank you
@TWLink1
@TWLink1 10 күн бұрын
Thank you for your clear and precise explanation. An old dog (me) learned a new trick today!
@marijastojanovic7414
@marijastojanovic7414 12 күн бұрын
The explanations on this channel are excellent. Thank you!
@foudilbenouci482
@foudilbenouci482 13 күн бұрын
Thank you very much.Very interesting topic
@mostafaessam592
@mostafaessam592 13 күн бұрын
Awesome video ❤
@foudilbenouci482
@foudilbenouci482 13 күн бұрын
The parellisation of the average() method doesn't give the same result : with parallelisation the result is 228150401,23158336 without parallelisation the method the result is 228150401,3512809.So an error is introduced
@CodingTutorialsAreGo
@CodingTutorialsAreGo 11 күн бұрын
I think that's related to the rounding errors one can get with doubles. Without parallelization, the rounding error is consistent, whereas with parallelization there is a degree of randomization, but neither is correct. If you do this with decimals instead of doubles, you consistently get the result 228,150,401.25. This is because the decimal type is explicitly designed to avoid rounding errors. We can verify this is the correct result by looking at the Sum() and Count() of the results, which are: 114,075,200,625,000,000 500,000,000 Cancelling the zeros gives: 114,075,200,625 500 I'm not going to do the full long division, but it's evident this ends in exactly .25.
@foudilbenouci482
@foudilbenouci482 11 күн бұрын
@@CodingTutorialsAreGo Yes it is related the rounding errors one can get with doubles . If you chunk the list depending on the chunks and their order you wont get nécessarily the exact same result . Thank you
@foudilbenouci482
@foudilbenouci482 13 күн бұрын
Parallel.ForEach(values, (value, _) => { results[value] = Factoriel(value % 20 + 1); usage.AddOrUpdate(Environment.CurrentManagedThreadId, 1, (_, count) => count + 1); } ); is working fine (value is the index) i didn't understand why you introduced the concurentBag collection for this loop
@CodingTutorialsAreGo
@CodingTutorialsAreGo 11 күн бұрын
The 'results' array has to be pre-allocated to the number of results, which in this case, we happen to know. In other circumstances, we might not know the final size, and if we want the collection to expand to fit, it has to be thread safe.
@foudilbenouci482
@foudilbenouci482 11 күн бұрын
@@CodingTutorialsAreGo clear thank you
@llionking055
@llionking055 14 күн бұрын
Many thanks❤ can we pass the token from the login response to the next request? We can set token to environment variable in Postman
@CodingTutorialsAreGo
@CodingTutorialsAreGo 13 күн бұрын
The way I'd do it would be to put the token in a variable, then use the variable in the authentication header for the request. Then you just have to cut and paste the token value from the login response to the variable.
@llionking055
@llionking055 11 күн бұрын
@@CodingTutorialsAreGo thank you for your response but I think it would be better if we could send the login request and then store it in a variable for the later request (similar to Postman)
@vivekmahajan6752
@vivekmahajan6752 14 күн бұрын
Great one :)
@abdelazizshaban5190
@abdelazizshaban5190 15 күн бұрын
You're underrated, Thank you
@foudilbenouci482
@foudilbenouci482 16 күн бұрын
The task execution is never deferred, it is executed immediatly after being called ?! However, you can choice the place in the proogam where to wait it after being called ?! Can you tell me if i a wrong and why ? Thank you
@CodingTutorialsAreGo
@CodingTutorialsAreGo 15 күн бұрын
Sorry, I don't understand the question.
@DoctorMGL
@DoctorMGL 16 күн бұрын
it can also be canceled within the for loop first line like : for (int i=0; token.IsCancellationRequested == false && i < count; i++){ ..... and i think this approach is better for performance than allowing the for() to loop > then we return it with 0 if the IsCancellationRequested success. because here we are checking for the condition before the loop even start processing
@CodingTutorialsAreGo
@CodingTutorialsAreGo 16 күн бұрын
Which is exactly what you don't want to do. You do not want to return 0 because that is not the correct result. And if the cancellation happened later, you would get a non-zero value that was still not the correct result. How would the client code know? You need to throw an exception to indicate that the calculation did not complete.
@DoctorMGL
@DoctorMGL 16 күн бұрын
​@@CodingTutorialsAreGo , good point, thanks for bringing my attention to this , and what i actually mean depend on the case . if the user ( Cancel the task ) vs ( he EXITs the Window ) , when Existing there is no longer " telling the user where did he stop " in this case we force the Cancellation at the closest point and Dispose everything . unless you want the user to continue his task from where did he stop if he launch the ( application / task ) again . if so that's another topic related to Cashing, something you may need in applications like "Internet download manager" where you want the user to have the ability to keep downloading from the same percentage he stop at even if the application exists or crashed .
@abdirizakjamalismail6672
@abdirizakjamalismail6672 17 күн бұрын
I don't agree with making program.cs public just for integration test. you can new up a WebApplicationFactory instead of using another class which inherits it.
@marceloleoncaceres6826
@marceloleoncaceres6826 17 күн бұрын
Great examples, thanks for sharing them,
@FinnGuttormsen
@FinnGuttormsen 18 күн бұрын
Following this example but using a rest api on another port, my httpClient.PostAsync first does a GET OPTIONS and then fails without ever doing the post method with a http exception "Could not fetch" . Any ideas?
@MuhammadAhmed-pd8zu
@MuhammadAhmed-pd8zu 19 күн бұрын
You are beyond wonderful!!!!! Thank you so much, this really helps
@Rohit-gq4pv
@Rohit-gq4pv 22 күн бұрын
Just a question, what if same user logged in two different devices? For example, a user logs in first device; it will update the RefreshToken column for that user in AspNetUsers table. On device 2 login, it will update the existing RefreshToken column value(it will replace the device 1 refresh token with device 2 refresh token) .So for device 1, how will refresh token work?
@CodingTutorialsAreGo
@CodingTutorialsAreGo 21 күн бұрын
You would need to store multiple refresh tokens in the DB.
@Rohit-gq4pv
@Rohit-gq4pv 21 күн бұрын
Thanks 👍
@vladmaiorov1072
@vladmaiorov1072 24 күн бұрын
What if I use no secret?
@asesorwebvideos
@asesorwebvideos 25 күн бұрын
Gracias saludos desde Chile
@sushantkhare8467
@sushantkhare8467 27 күн бұрын
This is a gem❤
@marceloleoncaceres6826
@marceloleoncaceres6826 Ай бұрын
Thanks for the video
@ISKernel
@ISKernel Ай бұрын
Very nice video !! I would love to see more. Just for clarification, it is quite difficult to follow from where "ReportThread" is called while looking at the output. Could you add maybe do something like: void ReportCall([CallerMemberName]string methodName = null, [CallerLineNumber]int lineNumber = -1) { Console.WriteLine($"Thread ID: {Thread.Id} at {methodName} line {lineNumber}"); } That would make is easier (at least for me) to follow.
@martinswanepoel2039
@martinswanepoel2039 Ай бұрын
Really great video thank you!
@BM-jy6cb
@BM-jy6cb Ай бұрын
These tutorials deserve 10 times more views than they currently have. Always clear and concise with no waffle. Many thanks, Jasper!
@agentsmith2189
@agentsmith2189 Ай бұрын
Ty <3 !!!! greating from Venezuela
@johannes3980
@johannes3980 Ай бұрын
I have a question. When I have a MAUI app as the client, for example, what is the best practice for the refresh flow to maintain a high user experience? Because when the access token is invalid, it would take six calls until I have the data if the token needs to be refreshed. So, should the token be refreshed in the background if it’s expired to maintain a high UX? Regards
@jimpaloander1888
@jimpaloander1888 Ай бұрын
1. They have to introduce vector math on arrays. Overloading operators +,*,-,/ create temporary objects. These in turn for long expressions and large vectors occupy as much extra memory as the number of extra temporaries. Fortran has it since decades ago, Zig has introduced it by scratch; it is unreasonable in 2024 C# not introducing vector math operations on arrays. 2. They should introduce a type for automatic differentiation (AD) build in the language so that 1st and 2nd order derivatives can be computed on the fly. 3. They have to introduce a feature for compile time code execution similar to Zig.
@johannes3980
@johannes3980 Ай бұрын
Great Video!
@4rmboy666
@4rmboy666 Ай бұрын
I have a question, but the topic is a bit different from Blazor. Basically, the question is about TypedReference in .NET (when we can/should use it) and about "hidden features" in c#, specifically __arglist and __makeref (again, when we can/should use them). I've done a some research, and you don't seem to have videos on these topics (
@pharoah327
@pharoah327 Ай бұрын
How can we return a Span from a function? Or any value type that has more than one field in it? In my understanding, when we return from a function, we pop the activation record, then pop the return address and follow it back to the caller. Since this pops the span from the stack, how do we use it in the calling function? With heap allocation, we can store a pointer in a register and use that to refer to the memory. Yet if we store a stack pointer to now unallocated memory, that wouldn't be good. So I'm really confused on how this would be used if returned from a function.
@alexulag
@alexulag Ай бұрын
Finally i found a video where i learned the whole concept!
@codingbloke
@codingbloke Ай бұрын
Wow! More than a year on since C#11 and I did not know about this feature. Really well explained thank you!
@conlethmackle4062
@conlethmackle4062 Ай бұрын
Such a great video
@conlethmackle4062
@conlethmackle4062 Ай бұрын
Best explanation yet on this topic I've seen
@diegomelgar2696
@diegomelgar2696 Ай бұрын
Hi Jasper, thanks again for your high quality videos! What happens when the user refresh the page in the summary page? Will the user still fetch the summary knowing that the JWt is still valid?
@CodingTutorialsAreGo
@CodingTutorialsAreGo Ай бұрын
Yes, the fetch will still work because the JWT is stored in session storage and the session persists for the lifetime of the tab. So a refresh within the tab doesn't lose the JWT.
@diegomelgar2696
@diegomelgar2696 Ай бұрын
Hi Jasper, again thanks for a high quality content video!! I wonder, having the Clockskew within the gap of the Tiemespan defined in the validation parameters. Wouldn’t it be appropriate to make the refresh token endpoint protected with Authorize attribute and documenting that the refresh token endpoint must be called within X seconds/minutes of time span in order to generate a new JWT? So, instead of creating a logic for adding a column or attribute for Refresh Token in Users table, the clockskew is the key for refreshing a new JWT, thus the Authorize data annotation will do the work to validate the token. Thanks again for your videos, they are very helpful 💯
@CodingTutorialsAreGo
@CodingTutorialsAreGo Ай бұрын
I've never seen that done. I'm not sure the idea of requiring the client to refresh within a time limit is a very good idea. It would require the client software to be running a timer, which obviously wouldn't work if the client shutdown (which also would lose tokens in session storage, but not local storage). Even if the client did stay up it would mean unnecessary transmission and refreshes of tokens, when the client code decided to update but the user didn't, which would be a potential security compromise.
@diegomelgar2696
@diegomelgar2696 Ай бұрын
@@CodingTutorialsAreGo the scenario I am talking is exactly that. In which, the client code will pop up a modal with a timer that tells the user “hey, you have X seconds/minutes left to stay up in the session. Would you like to extend your session?” And if the timer reaches to the 0 seconds, then it would automatically logs out the user. This leads me to a second question. How to invalidate the JWT when the user logs out and the JWT is still valid? The client might erase the token from cookie or local storage but as you mentioned it could be stolen for example, a man in the middle attack. Thanks Jasper!
@CodingTutorialsAreGo
@CodingTutorialsAreGo Ай бұрын
@@diegomelgar2696 That's one of the key things about JWTs - they cannot be invalidated, whereas refresh tokens can. That's why we have JWTs with a short expiry and refresh tokens with a longer one. I say they cannot be invalidated. You could make it so that the server holds a list of invalid JWTs which it rejects if they are used, but that's not the intended approach.
@diegomelgar2696
@diegomelgar2696 Ай бұрын
@@CodingTutorialsAreGo nice, thank you for your time and explanation Jasper!!
@JohnSmith-yr7ih
@JohnSmith-yr7ih Ай бұрын
'System.IdentityModel.Tokens.Jwt' is a legacy tool :( are you going to update WebApi+Blazor wasm Auth tutorials?
@liquidpebbles
@liquidpebbles Ай бұрын
Very glad I watched this video. I didn't know about the first method presented for using render fragments. Great stuff.
@finwwwfinwww4669
@finwwwfinwww4669 Ай бұрын
best explanation ....
@liquidpebbles
@liquidpebbles Ай бұрын
Extremely useful feature. Thanks for bringing it to light
@zanagi
@zanagi 2 ай бұрын
lul c# is really funny when one comes from c++ background... I was so lost.
@AmerBakeer
@AmerBakeer 2 ай бұрын
Very useful and informative. Thank you.
@sadeghshooshanzadeh1382
@sadeghshooshanzadeh1382 2 ай бұрын
very very useful tutorial. tnx a lot😊
@ehvlullo
@ehvlullo 2 ай бұрын
Great video. It's quite a big change again, but I do feel that having such granular control will be worth it in the end. I'm still trying to figure out if how much traditional web api's lose their relevance in all this.