Dajbych.net


dotnet round

What’s new in .NET 5?

.NET 5.0 is here. It is a suc­ces­sor of .NET Frame­work 4.8 a .NET Core 3.1. It means that Con­sole, Win­dows Forms and WPF apps can be now packed with its own run­time. It was al­ways pos­si­ble to em­bed .NET Run­time in­staller to the ap­pli­ca­tion in­staller it­self, but the new ap­proach means that mul­ti­ple apps does not share and there­fore does not de­pend on a sin­gle .NET Run­time. You can develop on lat­est bits without af­fect­ing others. Im­pli­ca­tions are huge. Read more ›

dotnet round

How C# nullable reference types affects your ASP.NET Core routing

I thought that the new C# 8.0 fea­ture – non-nul­lable ref­er­ence types is just an In­tel­liSense fea­ture pow­ered by Roslyn that pre­vents null ref­er­ence ex­cep­tions. I was wrong. It may af­fect how your ap­pli­ca­tion works in many ways. More specif­i­cally, ev­ery­thing that use re­flection can start be­having dif­fer­ently. It in­cludes also ASP.NET Core rout­ing. Some bind­ings can stop work­ing when no ad­di­tional code changes are ap­plied. Read more ›

dotnet round

Host ASP.NET Core on Oracle Autonomous Linux with Nginx

This ar­ti­cle is a step-by-step man­ual explaining how to cre­ate and con­fig­ure Or­a­cle Au­tonomous Linux vir­tual ma­chine for host­ing ASP.NET Core 3.1 web ap­pli­ca­tion. We will con­nect to Linux ma­chine from the Win­dows work­s­ta­tion by Pow­er­Shell. The ap­pli­ca­tion will be cre­ated and com­piled Vi­sual Stu­dio. The ap­pli­ca­tion is self-con­tained, so instal­la­tion of the .NET Core run­time is not nec­es­sary. Read more ›

dotnet round

What’s new in C# 7.1, 7.2 & 7.3 and what’s next

C# is con­tin­u­ously evolv­ing and ab­sorb­ing many use­ful fea­tures. Some of them are syn­tax sugar and Vi­sual Stu­dio will pro­pose a sim­pli­fied code, but some of them al­lows what wasn’t pos­si­ble be­fore so tak­ing ad­van­tage of new C# ver­sion re­quires a change of think­ing about the code. The best way how to un­lock new ca­pa­bil­i­ties is learning of func­tional pro­gram­ming be­cause most fea­tures are taken from F#. Read more ›

http

How to redirect to HTTPS in ASP.NET MVC application correctly

Up­grad­ing browsers vis­it­ing your web­site to se­cure con­nec­tion is a best prac­tice and it is easy to do. I have de­cided to share my im­ple­men­ta­tion be­cause I had seen many par­tial or in­se­cure im­ple­men­ta­tions. Cor­rect im­ple­men­ta­tion sat­is­fies both back­ward com­pat­i­bil­ity and se­cu­rity re­quire­ments of var­i­ous web browsers. This ar­ti­cle covers what you need to know be­fore you start to redi­rect your users to HTTPS pro­to­col. Read more ›

dotnet round

How to enable response compression in ASP.NET Core 2 with gzip and Brotli encoding

In­ter­net traf­fic can be com­pressed to save net­work band­width us­age. While im­ages and web fonts are al­ready com­pressed, text files are stored on the server in hu­man read­able form. HTTP.sys server and Kestrel cur­rently don't have built-in com­pres­sion sup­port. By de­fault, only static files are com­pressed with gzip. What if you want com­press more? Read more ›

dot net

How to write a custom awaitable method

When you are call­ing an asyn­chronously waitable (awaitable) method, you may be cu­ri­ous how to write a cus­tom awaitable method your­self. It is very sim­ple espe­cially in case when the class con­tains only sin­gle awaitable method. Ev­ery awaitable method re­quires its own class other­wise. Read more ›

dot net

What is .NET Core

It is the start of a new era of mak­ing soft­ware in the Mi­crosoft ecosys­tem. This restart pushes the .NET where it was orig­i­nally in­tended to be. Its pur­pose is sim­ple – reach­ing ev­ery plat­form and ev­ery op­er­at­ing sys­tem with C# lan­guage from Vi­sual Stu­dio. So why did it take so long? Well, this goal is ev­ery­thing but sim­ple. Only C++ lan­guage has been able to do that. The .NET is evo­lu­tion of C++ & COM world. To­day .NET fi­nally sup­ports na­tive com­pi­la­tion. Read more ›

dot net

Overview of the .NET Framework

The .NET is a very large frame­work and some­times is hard to de­cide whether to code some­thing or use an ex­ist­ing com­po­nent of the frame­work. Some­times is faster to code, but when pro­duc­tion work­load and re­li­a­bil­ity comes into play, the per­spec­tive is dif­fer­ent. An overview of what .NET of­fers is a fun­da­men­tal knowledge. It is hard to keep in track be­cause .NET evolves very fast. This ar­ti­cle dis­cusses essen­tials which is the .NET Frame­work built from. Read more ›

dot net

Portable Libraries – jedna knihovna pro všechny platformy

Portable Class Li­brary je uni­verzální .NET kni­hovna. Je užitečná pro sdílení kódu napřík­lad mezi WPF, Win­dows Phone a Metro style ap­likacemi. Může ob­sa­ho­vat vše, co je pro plat­formy, pro které je určená, společné. Díky do­plňku pro Vi­sual Stu­dio 2010 je možné ji začít použí­vat ihned. Je­likož se plat­forma .NET poslední roky poněkud tříští, je Portable Li­brary velmi ví­taný tmelící prvek. Už není nutné kom­pilo­vat kni­hovny pro různé .NET plat­formy. Celý článek ›

dot net

Portable Libraries – single library for all platforms

Portable Class Li­brary is a uni­ver­sal .NET li­brary. It is de­signed for shar­ing source code for ex­am­ple among WPF, Win­dows Phone and Metro style ap­pli­ca­tions. It may con­tain ev­ery­thing com­mon from tar­get plat­forms. Thanks to the Vi­sual Stu­dio 2010 ex­ten­sion you can start use it im­me­di­ately. Due to .NET Frame­work frag­men­ta­tion the Portable Li­brary is wel­come uni­fi­ca­tion el­e­ment. It is not nec­es­sary to com­pile li­braries against mul­ti­ple .NET plat­forms any­more. Celý článek ›

dot net

Double layered application with PowerShell in the middle

There are sev­eral rea­sons why use Pow­er­Shell. The most sig­nif­i­cant ad­van­tage is abil­ity to use script in­stead of user in­ter­face. Pow­er­Shell is for ad­min­is­tra­tor al­most the same en­vi­ron­ment as a con­sole ap­pli­ca­tion for de­vel­oper. When the core of your ap­pli­ca­tion is highly in­de­pen­dent so it is ex­treme easy build a con­sole ap­pli­ca­tion based on it con­sider us­ing Pow­er­Shell layer. Read more ›

dot net

SQL Server Compact 4

Mi­crosoft min­ulý tý­den vy­dal novou verzi své em­bed­ded databáze. Předešlé verze této databáze se použí­valy jen s desk­topovými ap­likacemi. Nebyla vytvořena tak, aby mohla ob­s­luho­vat více poža­davků zároveň. To se v nové verzi změnilo. Dá se bez obav z pádu či uváznutí použí­vat z více vláken současně. Tím se pole její pů­sob­nosti výrazně rozšířilo o nasazení na we­bových serverech. Databázi není potřeba in­stalo­vat, stačí pouze zkopírovat něko­lik souborů. Celý článek ›