Teemablogi sissekanded


ASP.NET Core: Replacement for Server.MapPath

There’s no Server. MapPath() in ASP. NET Core and things are way different than with old ASP. NET MVC. This blog post shows how application and public web files are organized in ASP. NET Core and how to access them from web applications. ASP. NET Core offers two different locations for files: Content root – this is where application binaries and other private files are held. 15:13 12.11.2018 kanalilt DT blogi 2


Reading GPS coordinates of photo on ASP.NET Core

During one of my ASP. NET Core classes I made demo about how to read GPS coordinates from photo and display location on a map. I took my favorite photo of beer kiosk in Krakow and displayed location of this kiosk on map. This blog post describes my experiment on getting GPS coordinates from EXIF data in ASP. NET Core application. 15:17 09.11.2018 kanalilt DT blogi 2


Building offline Blazor application

I made one small experiment and tried to get simple client-side Blazor application running on browser in offline mode. Yes, offline – visit application page once, turn out internet connection, open browser, type in application URL and it just runs. This blog post is short illustrated overview of my experiment. For this experiment I built simple beer calculator. 21:30 24.10.2018 kanalilt DT blogi 2


Server-side Blazor applications

Lately Blazor got important update – support for server-side Blazor applications. This blog post introduces how server-side Blazor applications work and what are pros and cons when considering building these. What is server-side Blazor application? By default Blazor applications run in browser and communicate with server-side API-s. All rendering and UI logic runs in browser. 09:14 19.10.2018 kanalilt DT blogi 2


String repeat method for C#

C# doesn’t have built-in function to repeat a string. There are different version for string. Repeat() available in internet and it’s up to reader to find out which version works better. Here is the list of most popular implementations I found across the web. I list my findings here with the results of simple performance test. String repeat implementations I found these six implementations to be. . . Source. 08:18 24.07.2018 kanalilt DT blogi 2


ASP. NET MVC error: It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level.

Error when running ASP. NET MVC application from Visual Studio: It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Stop inventing painful hacks, solution is here. How to reproduce This is what I have to do to get this error in Visual. . . Source. 07:30 12.07.2018 kanalilt DT blogi 2


Adding search to Blazor applications

As my Blazor demo application supports now Azure AD I took the next step and implemented search using Azure Search service. This blog post shows how to add search capabilities to Blazor application using Azure AD protected Azure Functions back-end and Azure Search service. Source code available! Source code for my Blazor demo solution is available at my GitHub repository peipman/BlazorDemo. Feel. . . Source. 10:14 11.07.2018 kanalilt DT blogi 2


Azure AD authentication in Blazor using ADAL.js

Although Blazor is in early stages of development it is already good enough to try out and play with it. As a logical continuation to my previous experiment where I made Blazor application use Azure Functions based back-end I made it also support Azure AD authentication on web application and back-end level. This blog post introduces my work on Blazor and Azure AD. Source code available! Source. . . Source. 07:23 09.07.2018 kanalilt DT blogi 2


Running WordPress on .NET Core

About year ago I wrote a blog post Running PHP applications on . NET Core where I introduced how to build PHP applications to . NET Core using Peachpie. Their showcase was WordPress – the famous blog engine that also runs my blog. Peachpie guys have made significant work over year and they have reached the point where whole WordPress is built as . NET Core application. Why WordPress on . NET Core? As. . . Source. 08:53 05.07.2018 kanalilt DT blogi 2


Hosting Azure Functions backed Blazor application on Azure Storage static website

My previous blog post was an introduction to static website hosting on Azure Storage. This post focuses on how to deploy Blazor application as a Azure static website on Azure Storage and how to use Azure Functions as a server back-end for Blazor application hosted as a static site. Source code available! Source code for this blog post is available in my GitHub repository gpeipman/BlazorDemo. Feel. . . Source. 08:58 04.07.2018 kanalilt DT blogi 2


Introducing static website hosting for Azure Storage

Azure has new and interesting service for hosting static sites on blob storage. There is no additional server-side application hosting account needed to run public static sites – they run straight from blob storage. Although the service is in public preview, it is time to find out how it works and when we should consider using it. Why static sites? One can argue that static sites are history and. . . Source. 08:08 03.07.2018 kanalilt DT blogi 2


ASP.NET Core Identity scaffolding

ASP. NET Core 2. 1 introduces Razor UI class libraries that allow us to share UI artifacts with libraries and NuGet packages. One of first official packages delivered with UI pieces is ASP. NET Core Identity. This blog post shows how to override default views of ASP. NET Core Identity by using scaffolding. Let’s start with ASP. NET Core 2. 1 application that uses individual accounts for users. ASP. NET. . . Source. 08:25 27.06.2018 kanalilt DT blogi 2


Injecting services to ASP. NET Core controller actions.

ASP. NET Core comes with thin but rich and powerful built-in dependency injection mechanism we can use to inject instances to controllers and some other parts of web applications. Although constructor injection is the most famous dependency injection method for controllers there is also dependency injection to controller actions available. This post introduces controller action injection and shows. . . Source. 07:30 25.06.2018 kanalilt DT blogi 2


Solving Remote Desktop problems on Windows 10

Remote Desktop is great thing when it works but with Windows 10 I usually see one problem after another. I decided to write up some tricks I need pretty often when RDP is going crazy on some Windows 10 box. Nothing special but I hope I save some people hours of time on trying out different tricks found in internet. Full screen RDP shows local taskbar in foreground This is one of the most annoying. . . Source. 10:09 22.06.2018 kanalilt DT blogi 2


Running ASP. NET Core application as Windows service.

ASP. NET Core 2. 1 introduces new application host for Windows services. We can now run ASP. NET Core applications as Windows services with minimal effort. This blog post introduces how it is done and how to build and run Windows services on ASP. NET Core without any need for dirty hacks. Creating default web application We start with new default ASP. NET Core 2. 1 web application. I don’t configure. . . Source. 08:20 20.06.2018 kanalilt DT blogi 2


Database level grouping in Entity Framework Core 2.

Previous versions of Entity Framework Core doesn’t support database level grouping and LINQ GroupBy is translated locally. Entity Framework Core 2. 1 translates LINQ GroupBy to database query in most of cases. Here is the example. To illustrate GroupBy translation I’m using database and some code from my multitenant ASP. NET Core sample solution. There is simple database with two entities not. . . Source. 08:52 19.06.2018 kanalilt DT blogi 2


Adding attribute to backing field of automated property

There are scenarios where developers want to add attributes to backing field of automated property. It was hard to do before C# 7. 3. Now it is supported in Visual Studio and solution is simple. This blog post shows how to add attribute to backing field of automated property. Suppose we have a class with automated property and we want to apply some attribute to backing field of this property. Also. . . Source. 07:11 18.06.2018 kanalilt DT blogi 2


Speaking at ITCamp 2018

Today and tomorrow I have honor to be a speaker at ITCamp 2018 at Cluj-Napoca, Romania. It is pretty big conference at Romania and I’m happy to see serious line-up of speakers and well organized event. Here is short overview of muy presentations at ITCamp 2018. I have two presentations: 07. 06 16:45 – Deep dive to C# 7This presentation is about new features in different versions of C# 7. I will. . . Source. 16:30 07.06.2018 kanalilt DT blogi 2


Speaking at Riga Dev Days 2018

This week I am speaker at Riga Dev Days 2018 conference – the biggest one happening this year at Baltic states. It has workshops day on 29th of May and two conference days on 30th and 31st of May. My presentation is on 30th at 17:30 o’clock and it is about Azure Computer Vision services. Here’s more about the event and my presentation there. Riga Dev Days brings together the world class experts in. . . Source. 10:13 29.05.2018 kanalilt DT blogi 2


Automatically describing and tagging pictures on SharePoint using Azure Cognitive Services

Azure Cognitive Services has wider audience than cool young guys developing very cool mobile apps. These services can be used in very different use cases. This blog post shows how to use Azure Cognitive Services to automatically describe and tag photos added to Office 365 SharePoint picture library using Microsoft Flow as workflow engine. Automatic image describing and tagging SharePoint on Office. . . Source. 08:00 23.05.2018 kanalilt DT blogi 2