DNTCommon.Web.Core 7.6.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package DNTCommon.Web.Core --version 7.6.6
                    
NuGet\Install-Package DNTCommon.Web.Core -Version 7.6.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DNTCommon.Web.Core" Version="7.6.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DNTCommon.Web.Core" Version="7.6.6" />
                    
Directory.Packages.props
<PackageReference Include="DNTCommon.Web.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DNTCommon.Web.Core --version 7.6.6
                    
#r "nuget: DNTCommon.Web.Core, 7.6.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DNTCommon.Web.Core@7.6.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DNTCommon.Web.Core&version=7.6.6
                    
Install as a Cake Addin
#tool nuget:?package=DNTCommon.Web.Core&version=7.6.6
                    
Install as a Cake Tool

DNTCommon.Web.Core

DNTCommon.Web.Core

DNTCommon.Web.Core provides common scenarios' solutions for ASP.NET Core applications.

Install via NuGet

To install DNTCommon.Web.Core, run the following command in the Package Manager Console:

Nuget

PM> Install-Package DNTCommon.Web.Core

You can also view the package page on NuGet.

Linux (and containers) support

The SkiaSharp library needs extra dependencies to work on Linux and containers. Please install the following NuGet packages:

PM> Install-Package SkiaSharp.NativeAssets.Linux.NoDependencies
PM> Install-Package HarfBuzzSharp.NativeAssets.Linux

You also need to modify your .csproj file to include some MSBuild directives that ensure the required files are in a good place. These extra steps are normally not required but seems to be some issues on how .NET loads them.

<Target Name="CopyFilesAfterPublish" AfterTargets="AfterPublish">
    <Copy SourceFiles="$(TargetDir)runtimes/linux-x64/native/libSkiaSharp.so" DestinationFolder="$([System.IO.Path]::GetFullPath('$(PublishDir)'))/bin/" />
    <Copy SourceFiles="$(TargetDir)runtimes/linux-x64/native/libHarfBuzzSharp.so" DestinationFolder="$([System.IO.Path]::GetFullPath('$(PublishDir)'))/bin/" />    
</Target>

Usage

After installing the DNTCommon.Web.Core package, to register its default providers, call services.AddDNTCommonWeb(); method in your Startup class.

using DNTCommon.Web.Core;

namespace MyWebApp
{
    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddDNTCommonWeb();
        }

Features

  • ActionResults

  • Caching

    • ICacheService encapsulates IMemoryCache functionalities.
    • [NoBrowserCache] action filter sets no-cache, must-revalidate, no-store headers for the current Response.
  • DependencyInjection

    • IServiceProviderExtensions creates an IServiceScope which contains an IServiceProvider used to resolve dependencies from a newly created scope and then runs an associated callback.
  • Drawing

  • Http

    • ICommonHttpClientFactory service, reuses a single HttpClient instance across a multi-threaded application.
    • DomainHelperExtensions provides useful extension methods to extract domain info of the URL's.
    • IDownloaderService encapsulates HttpClient's best practices of downloading large files.
    • IHtmlHelperService provides helper methods to work with HTML contents such as extracting links and titles or changing relative Urls to absolute Urls.
    • IHttpRequestInfoService provides useful methods to work with current HttpContext.Request.
    • IRedirectUrlFinderService finds the actual hidden URL after multiple redirects.
    • IUrlNormalizationService transforms a URL into a normalized URL so it is possible to determine if two syntactically different URLs may be equivalent.
    • IHtmlReaderService reads the HTML document's nodes recursively.
    • IUAParserService is the updated version of the UAParser library with the latest regexes.yaml file.
  • Mail

    • IWebMailService simplifies sending an email using the MailKit library. It's able to use razor based email templates.
  • ModelBinders

    • PersianDateModelBinderProvider parses an incoming Persian date and then binds it to a DateTime property automatically. To use it globally ( assuming your app only sends Persian dates to the server), Add it to MvcOptions: services.AddMvc(options => options.UsePersianDateModelBinder()) or just apply it to an specific view-model [ModelBinder(BinderType = typeof(PersianDateModelBinder))].
    • YeKeModelBinderProvider parses an incoming text and then corrects its Ye & Ke characters automatically. To use it globally, Add it to MvcOptions: services.AddMvc(options => options.UseYeKeModelBinder()) or just apply it to an specific view-model [ModelBinder(BinderType = typeof(YeKeModelBinder))].
    • ApplyCorrectYeKeFilterAttribute parses an incoming text and then corrects its Ye & Ke characters automatically. To use it globally, Add it to MvcOptions: services.AddControllersWithViews(options => options.Filters.Add(typeof(ApplyCorrectYeKeFilterAttribute))).
  • Mvc

  • Blazor

  • Schedulers

    • BackgroundQueueController A .NET Core replacement for the old HostingEnvironment.QueueBackgroundWorkItem method.
    • ScheduledTasksController DNTScheduler.Core is a lightweight ASP.NET Core's background tasks runner and scheduler. To define a new task, create a new class that implements the IScheduledTask interface. To register this new task, call services.AddDNTScheduler(); method in your Startup class. AddDNTScheduler method, adds this new task to the list of the defined tasks. Also its first parameter defines the custom logic of the running intervals of this task. It's a callback method that will be called every second and provides the utcNow value. If it returns true, the job will be executed.If you have multiple jobs at the same time, the order parameter's value indicates the order of their execution.
  • Security

    • [AjaxOnly] action filter determines whether the HttpRequest's X-Requested-With header has XMLHttpRequest value.
    • IProtectionProviderService is an encryption provider based on Microsoft.AspNetCore.DataProtection.IDataProtector. It's only useful for short-term encryption scenarios such as creating encrypted HTTP cookies.
    • IFileNameSanitizerService determines whether the requested file is safe to download to avoid Directory Traversal & File Inclusion attacks.
    • UploadFileExtensions attribute determines only selected file extensions are safe to be uploaded.
    • AllowUploadSafeFiles attribute disallows uploading dangerous files such as .aspx, web.config and .asp files.
    • AntiDosMiddleware is a rate limiter and throttling middleware for ASP.NET Core apps. To use it first add app.UseAntiDos() and services.Configure<AntiDosConfig> to Startup.cs file. Then complete the AntiDosConfig section of the appsettings.json file.
    • IAntiXssService provides a cleaning service for unsafe HTML fragments that can lead to XSS attacks based on a whitelist of allowed tags and attributes. To use it add services.Configure<AntiXssConfig> to Startup.cs file. Then complete the AntiXssConfig section of the appsettings.json file.
    • IPasswordHasherService provides a custom Pbkdf2 hashing and validating service.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on DNTCommon.Web.Core:

Repository Stars
VahidN/DNTIdentity
A highly customized sample of the ASP.NET Core Identity
VahidN/DntSite
این پروژه، سورس کامل و در حال استفاده‌ی وب‌سایت «دات‌نت تيپس» است
Version Downloads Last Updated
12.4.1 28 1/6/2026
12.4.0 69 1/3/2026
12.3.0 53 1/3/2026
12.2.2 51 1/2/2026
12.2.1 45 1/2/2026
12.2.0 120 12/30/2025
12.1.2 210 12/21/2025
12.1.1 233 12/19/2025
12.1.0 517 12/9/2025
12.0.0 362 12/7/2025
11.9.0 858 12/1/2025
11.8.7 637 11/21/2025
11.8.6 601 11/17/2025
11.8.5 2,090 9/30/2025
11.8.4 865 8/24/2025
11.8.3 458 8/24/2025
11.8.2 1,154 7/22/2025
11.8.1 528 7/14/2025
11.8.0 628 6/30/2025
11.7.0 567 6/15/2025
11.6.1 602 6/13/2025
11.6.0 580 6/13/2025
11.5.1 626 6/13/2025
11.5.0 615 6/1/2025
11.4.0 657 5/27/2025
11.3.0 607 5/25/2025
11.2.0 529 5/16/2025
11.1.0 546 5/7/2025
11.0.0 872 5/6/2025
10.9.0 442 5/4/2025
10.8.0 372 5/2/2025
10.7.1 425 4/27/2025
10.7.0 340 4/26/2025
10.6.0 552 4/20/2025
10.5.0 556 4/9/2025
10.4.0 799 3/28/2025
10.3.0 279 3/15/2025
10.2.0 313 3/13/2025
10.1.0 477 3/5/2025
10.0.0 403 3/3/2025
9.9.1 297 3/2/2025
9.9.0 257 3/1/2025
9.8.2 494 2/21/2025
9.8.1 299 2/21/2025
9.8.0 318 2/21/2025
9.7.0 354 2/18/2025
9.6.1 421 2/14/2025
9.6.0 366 2/13/2025
9.5.0 358 2/11/2025
9.4.0 366 2/10/2025
9.3.0 495 2/7/2025
9.2.0 272 2/5/2025
9.1.0 285 2/4/2025
9.0.0 522 2/2/2025
8.9.0 929 2/1/2025
8.8.0 429 1/25/2025
8.7.1 508 1/19/2025
8.7.0 252 1/18/2025
8.6.0 305 1/17/2025
8.5.0 320 1/14/2025
8.4.0 292 1/12/2025
8.3.0 493 1/10/2025
8.2.7 292 1/8/2025
8.2.6 245 1/8/2025
8.2.5 397 1/1/2025
8.2.4 336 12/29/2024
8.2.3 316 12/26/2024
8.2.2 897 12/25/2024
8.2.1 274 12/24/2024
8.2.0 282 12/22/2024
8.1.0 222 12/22/2024
8.0.0 1,753 12/22/2024
7.9.11 250 12/21/2024
7.9.10 764 12/20/2024
7.9.9 185 12/19/2024
7.9.8 174 12/19/2024
7.9.7 195 12/18/2024
7.9.6 181 12/18/2024
7.9.5 399 12/17/2024
7.9.4 204 12/16/2024
7.9.3 222 12/15/2024
7.9.2 186 12/15/2024
7.9.1 215 12/14/2024
7.9.0 282 12/10/2024
7.8.1 286 12/6/2024
7.8.0 271 12/4/2024
7.7.0 272 12/1/2024
7.6.9 269 11/28/2024
7.6.8 2,354 11/19/2024
7.6.7 247 11/17/2024
7.6.6 194 11/17/2024
7.6.5 210 11/17/2024
7.6.4 174 11/17/2024
7.6.3 383 11/15/2024
7.6.2 196 11/13/2024
7.6.1 276 11/10/2024
7.6.0 229 11/9/2024
7.5.0 210 11/8/2024
7.4.0 190 11/8/2024
7.3.0 209 11/7/2024
7.2.0 235 10/31/2024
7.1.0 364 10/17/2024
7.0.0 190 10/15/2024
6.9.3 208 10/14/2024
6.9.2 196 10/14/2024
6.9.1 212 10/13/2024
6.9.0 206 10/13/2024
6.8.3 237 10/9/2024
6.8.2 197 10/9/2024
6.8.1 192 10/6/2024
6.8.0 228 10/1/2024
6.7.0 359 9/22/2024
6.6.2 196 9/21/2024
6.6.1 313 9/17/2024
6.6.0 255 9/15/2024
6.5.1 303 9/15/2024
6.5.0 210 9/15/2024
6.4.0 438 9/8/2024
6.3.1 279 8/30/2024
6.3.0 623 8/27/2024
6.2.1 324 8/21/2024
6.2.0 1,040 8/18/2024
6.1.0 214 8/17/2024
6.0.3 218 8/17/2024
6.0.2 236 8/16/2024
6.0.1 239 8/14/2024
6.0.0 240 8/13/2024
5.9.2 253 8/8/2024
5.9.1 163 8/5/2024
5.9.0 198 8/2/2024
5.8.0 176 7/31/2024
5.7.0 148 7/31/2024
5.6.2 185 7/29/2024
5.6.1 173 7/29/2024
5.6.0 196 7/29/2024
5.5.0 267 7/26/2024
5.4.0 219 7/25/2024
5.3.7 537 7/6/2024
5.3.6 350 6/29/2024
5.3.5 208 6/29/2024
5.3.4 664 6/25/2024
5.3.3 481 6/3/2024
5.3.2 248 6/2/2024
5.3.1 190 6/2/2024
5.3.0 294 5/12/2024
5.2.0 224 5/11/2024
5.1.0 235 5/9/2024
5.0.0 278 4/29/2024
4.9.0 223 4/25/2024
4.8.0 211 4/23/2024
4.7.2 222 4/22/2024
4.7.1 222 4/22/2024
4.7.0 219 4/22/2024
4.6.0 270 4/15/2024
4.5.0 229 4/13/2024
4.3.1 389 4/9/2024
4.3.0 242 4/5/2024
4.2.1 317 3/27/2024
4.2.0 227 3/27/2024
4.1.0 331 3/17/2024
4.0.1 278 3/17/2024
4.0.0 218 3/16/2024
3.9.2 284 3/2/2024
3.9.1 218 2/29/2024
3.9.0 548 2/18/2024
3.8.2 274 2/6/2024
3.8.1 216 1/31/2024
3.8.0 255 1/30/2024
3.7.0 875 12/28/2023
3.6.0 652 11/19/2023
3.5.5 238 11/18/2023
3.5.4 2,504 9/21/2023
3.5.3 1,047 8/30/2023
3.5.2 2,135 3/15/2023
3.5.1 481 3/5/2023
3.5.0 1,175 12/22/2022
3.4.1 2,245 11/20/2022
3.4.0 7,394 6/28/2022
3.3.1 607 6/25/2022
3.3.0 5,108 1/27/2022
3.2.1 856 12/18/2021
3.2.0 504 12/18/2021
3.1.0 659 11/28/2021
3.0.0 789 11/9/2021
2.9.5 934 10/26/2021
2.9.4 1,783 7/31/2021
2.9.3 592 7/31/2021
2.9.2 1,199 6/7/2021
2.9.1 2,681 2/24/2021
2.9.0 865 1/15/2021
2.8.2 716 1/8/2021
2.8.1 669 12/27/2020
2.8.0 661 12/27/2020
2.7.1 792 12/25/2020
2.7.0 629 12/24/2020
2.6.0 741 12/17/2020
2.5.0 1,934 11/23/2020
2.4.0 1,865 11/11/2020
2.3.2 909 10/17/2020
2.3.1 778 10/10/2020
2.3.0 664 10/8/2020
2.2.0 786 9/29/2020
2.1.1 1,162 9/12/2020
2.1.0 728 9/11/2020
2.0.0 1,010 9/3/2020
1.9.0 1,160 9/2/2020
1.8.2 2,945 6/8/2020
1.8.1 2,859 12/7/2019
1.8.0 1,131 10/23/2019
1.7.0 892 10/17/2019
1.6.1 1,116 9/24/2019
1.6.0 767 8/28/2019
1.5.1 582 8/14/2019
1.5.0 537 8/8/2019
1.4.0 9,167 3/23/2019
1.3.3 4,367 12/6/2018
1.3.2 1,694 9/20/2018
1.3.1 1,299 9/18/2018
1.3.0 2,124 6/7/2018
1.2.0 1,884 4/30/2018
1.1.0 1,739 4/21/2018
1.0.0 1,949 4/18/2018