اشتراک‌ها
نگاهی به Docker ها در ویندوز سرور 2016
With the release of Technical Preview 3 (TP3) for Windows Server 2016, Microsoft for the first time have enabled native Containers under the Windows platform. Integrated with this is the Docker support for Windows Server, meaning you can run Docker containers in a Windows environment 
نگاهی به Docker ها در ویندوز سرور 2016
نظرات مطالب
Url Routing در ASP.Net WebForms
من قبلا در پروژه هام Url Routing رو انجام دادم و هیچ مشکلی نداشتم ولی تو پروژه جدیدم کار نمیکنه آیا ممکنه که مشکل از ویژوال استودیو باشه (2013)؟
این ارور ور میده
 The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Service/1/ewr/
این هم کد‌های کامل
public static void RegisterRoutes(RouteCollection routes)
{
   routes.MapPageRoute( "Service" ,  "Service/{ID}/{ProductTitle}" ,  "~/Service.aspx" );
}

void Application_Start( object sender, EventArgs e)
{
   RegisterRoutes(RouteTable.Routes); 
}
 کد لینک
 <asp:HyperLink ID= "HyperLink2" runat= "server" NavigateUrl= '<%# string.Format("/Service/{0}/{1}", Eval("ProductID") ,Eval("ProductTitle").ToString().Replace(" ", "-")) %>' />
 کد صفحه مقصد
protected void LinqDataSource1_Selecting( object sender, LinqDataSourceSelectEventArgs e)
{
   int ID =  int .Parse(Page.RouteData.Values[ "ID" ].ToString());
   e.Result = db.Product.Where(p => p.ProductID == ID).FirstOrDefault(); 
}
پاسخ به بازخورد‌های پروژه‌ها
نحوه سفارشی سازی ویو های این پروژه
من برای اطمینان دستورات زیر رو اجرا کردم
update-package T4MVC -Reinstall -ProjectName Decision.Web
update-package Microsoft.AspNet.Mvc -ProjectName Decision.Web
update-package Microsoft.Web.Infrastructure -ProjectName Decision.Web
Install-Package RazorGenerator.Mvc
Enable-RazorGenerator
Redo-RazorGenerator
و همه Successfull داد

منوی intellisense برای T4MVC در کنترولر و ویو قابل دسترسی است با راست کلیک و اجرای Run custom tool همچنان پیام Security Warning  را دریافت می‌کنم با ok  (البته اینبار خطاها از بین رفتند)  و اکشن‌ها بصورت virtual تغییر می‌کنند ولی خطای

Server Error in '/' Application.


The resource cannot be found.

Description:  HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL:  /Home/Index2

برای اکشن index2 دریافت می‌کنم . Build solution  هم فراموش نشده بقیه اکشنهای پروژه بدرستی کار می‌کنند و حتی امکان سفارشی سازی آنها هست فقط اکشنهای جدید با خطای بالا مواجه میشند .

اشتراک‌ها
چگونه در dotNET Core از Performance Counters استفاده کنیم

Performance counters are really important for monitoring and troubleshooting problems with your .NET applications. The full .NET Framework provides a wide array of performance counters that are very useful for troubleshooting application problems. 

چگونه در dotNET Core از Performance Counters استفاده کنیم
اشتراک‌ها
Visual Studio 2019 version 16.5.5 منتشر شد

Fixed In This Release of Visual Studio 2019 version 16.5

Security Advisory Notice

CVE-2020-1108 .NET Core Denial of Service Vulnerability

A remote unauthenticated attacker could exploit this vulnerability by issuing specially crafted requests to the .NET Core application. The security update addresses the vulnerability by correcting how the .NET Core web application handles web requests.

CVE-2020-1161 .NET Core Denial of Service Vulnerability

A remote unauthenticated attacker could exploit this vulnerability by issuing specially crafted requests to the ASP.NET Core application. The security update addresses the vulnerability by correcting how the ASP.NET Core web application handles web requests. 

Visual Studio 2019 version 16.5.5 منتشر شد
اشتراک‌ها
غروب log4net

As of April 1, 2020 Log4Net is a dormant project of Apache Logging Services. The dormant status means the project has been classified as inactive since it has had no recent development activity and there are no active volunteers to perform code reviews, commit code, or perform releases. Although it is possible volunteers might choose to participate in the future, it is best to assume there will be not future development or releases. 

https://github.com/apache/logging-log4net 

غروب log4net
اشتراک‌ها
اعتبارسنجی IOptions توسط کتابخانه MiniValidation

In this post I described the problem that by default, DataAnnotation validation doesn't recursively inspect all properties in an object for DataAnnotation attributes. There are several solutions to this problem, but in this post I used the MiniValidation library from Damian Edwards. This simple library provides a convenience wrapper around DataAnnotation validation, as well as providing features like recursive validation. Finally I showed how you can replace the built-in DataAnnotation validation with a MiniValidation-based validator

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddOptions<MySettings>()
    .BindConfiguration("MySettings")
    .ValidateMiniValidation() // 👈 Replace with mini validation
    .ValidateOnStart();

var app = builder.Build();
OptionsValidationException: 
  DataAnnotation validation failed for 'MySettings' member: 'Nested.Value' with errors: 'The Value field is required.'.; 
  DataAnnotation validation failed for 'MySettings' member: 'Nested.Count' with errors: 'The field Count must be between 1 and 100.'.
Microsoft.Extensions.Options.OptionsFactory<TOptions>.Create(string name)
Microsoft.Extensions.Options.OptionsMonitor<TOptions>+<>c__DisplayClass10_0.<Get>b__0()


اعتبارسنجی IOptions  توسط کتابخانه MiniValidation
اشتراک‌ها
ویدئوی آموزشی Simplify & improve your C# 7 code in Visual Studio 2017

C# can be developed and run on more and more platforms, and thanks to the "Roslyn" language engine you can increasingly make your own tooling for it. C# 7 embraces several new features for working better with data, such as tuples and pattern matching. Come see how you can start using C# 7 today! 

ویدئوی آموزشی Simplify & improve your C# 7 code in Visual Studio 2017
اشتراک‌ها
PowerShell 7 و استفاده از NET Core 3x.

PowerShell 7 now utilizes .NET Core 3.1, but keeps backward compatibility with modules previously available for the classic PowerShell product. Also, PowerShell introduces a new argument, -UseWindowsPowerShell, to force run a cmdlet under the classic engine. 

PowerShell 7 و استفاده از NET Core 3x.