اشتراک‌ها
آموزش ساخت یک بلاگ با Blazor .Net 8

In this video we will build a complete full stack Blog Web App using the new Blazor Web App with SSR with .Net 8 | Step by Step | From Scratch to End You will learn: New Static Server Side Rendering with Blazor, QuickGrid, Enhanced Navigation, Enhanced Forms, Stream Rendering, Image Preview & Upload, Identity Authentication, Interactive Server Render Mode for Admin Panel, and much more  

آموزش ساخت یک بلاگ با  Blazor .Net 8
نظرات مطالب
سفارشی سازی ASP.NET Core Identity - قسمت پنجم - سیاست‌های دسترسی پویا
سلام؛ در متد CanUserAccess کلاس SecurityTrimmingService:
 public bool CanUserAccess(ClaimsPrincipal user, string area, string controller, string action)
        {
            var currentClaimValue = $"{area}:{controller}:{action}";
            var securedControllerActions = _mvcActionsDiscoveryService.GetAllSecuredControllerActionsWithPolicy(ConstantPolicies.DynamicPermission);
            if (!securedControllerActions.SelectMany(x => x.MvcActions).Any(x => x.ActionId == currentClaimValue))
            {
                throw new KeyNotFoundException($@"The `secured` area={area}/controller={controller}/action={action} with `ConstantPolicies.DynamicPermission` policy not found. Please check you have entered the area/controller/action names correctly and also it's decorated with the correct security policy.");
            }

            if (!user.Identity.IsAuthenticated)
            {
                return false;
            }

            if (user.IsInRole(ConstantRoles.Admin))
            {
                // Admin users have access to all of the pages.
                return true;
            }

            // Check for dynamic permissions
            // A user gets its permissions claims from the `ApplicationClaimsPrincipalFactory` class automatically and it includes the role claims too.
            return user.HasClaim(claim => claim.Type == ConstantPolicies.DynamicPermissionClaimType &&
                                          claim.Value == currentClaimValue);
        }
ابتدا بررسی میشه که کاربر دارای دسترسی مورد نظر می‌باشد و سپس چک میشه که کاربر احراز هویت شده و دارای دسترسی admin می‌باشد.
آیا کاربری که دارای دسترسی Admin می‌باشد نیازی به چک کردن  HasClaim دارد؟
مثلا اگر این متد به این صورت نوشته شود مشکلی پیش میاد؟
public bool CanUserAccess(ClaimsPrincipal user, string area, string controller, string action)
        {
            if (!user.Identity.IsAuthenticated)
            {
                return false;
            }

            if (user.IsInRole(ConstantRoles.Admin))
            {
                // Admin users have access to all of the pages.
                return true;
            }

            var currentClaimValue = $"{area}:{controller}:{action}";
            var securedControllerActions = _mvcActionsDiscoveryService.GetAllSecuredControllerActionsWithPolicy(ConstantPolicies.DynamicPermission);
            if (!securedControllerActions.SelectMany(x => x.MvcActions).Any(x => x.ActionId == currentClaimValue))
            {
                throw new KeyNotFoundException($@"The `secured` area={area}/controller={controller}/action={action} with `ConstantPolicies.DynamicPermission` policy not found. Please check you have entered the area/controller/action names correctly and also it's decorated with the correct security policy.");
            }

            // Check for dynamic permissions
            // A user gets its permissions claims from the `ApplicationClaimsPrincipalFactory` class automatically and it includes the role claims too.
            return user.HasClaim(claim => claim.Type == ConstantPolicies.DynamicPermissionClaimType &&
                                          claim.Value == currentClaimValue);
        }
اشتراک‌ها
مدیریت بدون کاغذ با OneNote 2016
OneNote makes your paper notebooks, index cards, and sticky notes obsolete, taming the “paper jungle” and raising your note taking to a whole new level. Microsoft OneNote 2016 makes taking notes a paperless activity, helping you become more organized, more productive, and more persuasive with your ideas than ever before.
مدیریت بدون کاغذ با OneNote 2016
اشتراک‌ها
ابزار کمکی (اوپن سورس) برای ویندوز 10 , 11 توسط مایکروسافت

با نصب این برنامه نسبتا کم حجم (اوپن سورس) مجموعه ای از چند ابزار جانبی برروی کامپیوترتان نصب می‌شود. یکی از ابزارهای بسیار کاربردی آن Color Picker است که با فشردن کلید‌های Win+shift+C این برنامه فعال شده و با کیلک بر روی هر نقطه از عکس کد رنگ نقطه انتخابی را نمایش میدهد.

سایر ابزار شامل این موارد است:

Always On Top, File Explorer add-ons, File locksmith, Image Resizer, Keyboard Manager, Mouse utilities, Power rename (enables you to perform bulk renaming, searching and replacing file names), PowerToysRun (can help you search and launch your app instantly. To open, use the shortcut Alt+Space and start typing), Screen Ruler, ShortCut Guid(shows the available shortcuts for the current state of the desktop), Text Extractor, Fancy Zones, PowerToys Awake

ابزار کمکی (اوپن سورس) برای ویندوز 10 , 11 توسط مایکروسافت
اشتراک‌ها
امکانات جدید در فایرفاکس کوانتم

Firefox Quantum is over twice as fast as Firefox from 6 months ago, built on a completely overhauled core engine with brand new technology stolen from our advanced research group, and graced with a beautiful new look designed to get out of the way and let you do what you do best: surf a ton of pages, open a zillion tabs, all guilt free because Firefox Quantum uses less memory than the competition 

امکانات جدید در فایرفاکس کوانتم
اشتراک‌ها
کتاب ASP.NET MVC 5: A Beginner’s Guide

Table of Contents
  • Introduction
  • Prerequisites
  • Environment Settings and Tools Used
  • Getting Started
  • Brief Overview of ASP.NET MVC
  • Creating a Database
  • Creating Database Tables
  • Adding a New ASP.NET MVC 5 Project
  • Setting Up the Data Access using Entity Framework Database-First approach
  • Creating a Signup Page
  • Creating the Login Page
  • Implementing a Simple Role-Based Page Authorization
  • Implementing Fetch, Edit, Update and Delete Operations
  • Creating a User Profile Page
  • Implementing a ShoutBox Feature
  • Deploying Your ASP.NET MVC 5 App to IIS8
  • Summary 
کتاب ASP.NET MVC 5: A Beginner’s Guide
اشتراک‌ها
آموزش Asp.Net Core Web API CRUD با Angular 16

Asp.Net Core Web API CRUD with Angular 16
In this .Net 7 tutorial, we have implemented CRUD operations in asp.net core web api with angular 16 using entity framework core and SQL server. 

آموزش Asp.Net Core Web API CRUD با Angular 16
اشتراک‌ها
Lazy Loading و مزایای استفاده از آن در بخش Write سیستم

In Defense of Lazy Loading

I don’t know how this happened but for the last couple years (at least), whenever I read an author who writes about ORMs, I often see a sentiment like this: “ORMs are fine, just make sure you disable this pesky feature called Lazy Loading”.

It’s like this feature is not even needed and only brings confusion and performance issues to everyone who chooses to use it. Well, as you may guess from the title of this article, I disagree with this point of view completely. 

Lazy Loading و مزایای استفاده از آن در بخش Write سیستم
اشتراک‌ها
کتابخانه های برنامه های Front-End و معماری کامپوننت ها

Component architectures are an important part of ever modern front-end framework. In this article, I’m going to dissect Polymer, React, Rio.js, Vue.js, Aurelia and Angular 2 components. The goal is to make the commonalities between each solution obvious. Hopefully, this will convince you that learning one or the other isn’t all that complex, given that everyone has somewhat settled on a component architecture. 

کتابخانه های برنامه های Front-End و معماری کامپوننت ها
اشتراک‌ها
کنفرانس NET Conf: Focus on Windows. تا 17 روز دیگر

.NET Conf: Focus on Windows is a free, one-day livestream event that features speakers from the community and Microsoft teams working on Windows desktop apps and making them fantastic on the latest .NET 5. Learn why and how to upgrade WPF and Windows Forms apps to .NET 5, see Visual Studio tooling improvements, learn how to leverage cloud services from your client apps, and a whole lot more. You'll also see what the future of native device development with .NET will look like in .NET 6.  

کنفرانس NET Conf: Focus on Windows. تا 17 روز دیگر