اشتراک‌ها
رونمایی از Windows Compatibility Pack for .NET Core

Porting existing code to .NET Core used to be quite hard because the available API set was very small. In .NET Core 2.0, we already made this much easier, thanks to .NET Standard 2.0. Today, we’re happy to announce that we made it even easier with the Windows Compatibility Pack, which provides access to an additional 20,000 APIs via a single NuGet package. 

رونمایی از Windows Compatibility Pack for .NET Core
اشتراک‌ها
بررسی ASP.NET Core

If you stumble into this with no idea who I am or why I’m arrogant enough to think I’m qualified to potentially criticize the ASP.Net Core internals, I’m the primary author of both StructureMap (the IoC container) and an alternative “previous generation” OSS web development framework called FubuMVC that tackled a lot of the same problems that ASP.Net Core addresses now that were not part of older ASP.Net MVC or Web API. 

بررسی ASP.NET Core
اشتراک‌ها
کار با ASP.NET Identity vNext

In this episode of Dev Superpowers, Ben Cull will take you through the latest, greatest and safest way to get your membership system up and running using ASP.NET Identity, OWIN and Dependency Injection.

کار با ASP.NET Identity vNext
اشتراک‌ها
معماری های رایج برنامه های وب

Most traditional .NET applications are deployed as single units corresponding to an executable or a single web application running within a single IIS appdomain. This approach is the simplest deployment model and serves many internal and smaller public applications very well. However, even given this single unit of deployment, most non-trivial business applications benefit from some logical separation into several layers. 

معماری های رایج برنامه های وب
اشتراک‌ها
NET 8 RC2. منتشر شد

.NET 8 RC2 is now available. This is our last release candidate. This release includes new NuGet package READMEs for .NET packages, simple CLI-based project evaluation for MSBuild, publishing containers to tar.gz archives, and Tensor Primitives for .NET. 

NET 8 RC2. منتشر شد
اشتراک‌ها
DNX چیست؟

DNX, a Dot Net eXecution environment, contains all of the code that is required to bootstrap and run an application.

DNX چیست؟
نظرات اشتراک‌ها
پیاده سازی ساده Google Recaptcha در ASP.NET MVC
چند نکته در جهت بهبود کیفیت کدهای آن

- یک چنین سطری در برنامه‌های ASP.NET نباید وجود داشته باشد:
if (!Task.Run(() => client.IsAcceptAsync(response, secretkey)).Result)
کلا ASP.NET MVC 5.x روشی را برای اجرای async اکشن فیلترها ندارد. البته این محدودیت در نگارش Core برطرف شده‌است.
اگر در نگارش 5x از Task.Run استفاده کنید، سبب بروز این مشکلات خواهید شد:
- تداخل با thread pool خود ASP.NET که سبب کاهش کارآیی برنامه با مصرف تردی اضافی می‌شود.
- سبب اجرای قطعه کد قرار گرفته‌ی درون آن، خارج از  request context جاری می‌شود.
یعنی در اینجا یک ترد جدید را ایجاد کردید و همچنین با استفاده از Result اجرای غیرهمزمان کدهای داخل آن‌را سد کردید. این یک سطر باز هم غیرهمزمان اجرا می‌شود. بنابراین نیازی به Task.Run ندارد؛ چون با مصرف کردن یک ترد اضافی، جلوی پاسخ‌دهی برنامه را به یک درخواست ممکن می‌گیرد.
همچنین بجای استفاده‌ی از Result هم به این صورت عمل کنید:
if (!client.IsAcceptAsync(response, secretkey).GetAwaiter().GetResult())

- از قطعه کد زیر استفاده نکنید. اطلاعات بیشتر
using (var client = new HttpClient())
اشتراک‌ها
استفاده از کتابخانه MediatR برای پیاده سازی DomainEventها در پروژه های ASP.NET Core

I’ve started looking at using MediatR for my domain events implementations. To that end, I created a quick sample project using ASP.NET Core 2.0. Overall things were pretty easy to get going. If you haven’t used MediatR before, or if you’re looking for a quick intro on how to set it up for ASP.NET Core, keep reading (if not, how did you get here? Was the title not clear?). 

استفاده از کتابخانه MediatR برای پیاده سازی DomainEventها در پروژه های ASP.NET Core