Recently, someone asked me to look at their ASP.NET MVC application and help figure out why a certain request was taking 16 seconds to complete. It’s always fun to look at those things, so I could not pass on this nerd snipe.
Getting Started: Observe
Much like with hunting serial killers, you have to become one with the scene at hand. Look at a few things that happen, and observe.
In this article, we will understand how to deploy an ASP.NET Core hosted Blazor application with the help of IIS 10 on a Windows 10 machine. We will be using Visual Studio 2017 to publish the app and SQL Server 204 to handle DB operations. We will also troubleshoot some of the common hosting issues for a Blazor application.
Please refer to my previous article Cascading DropDownList in Blazor Using EF Core to create the application that we will be deploying in this tutorial.
ASP.NET Core already has this feature. There is a ILoggerFactory to create a logger. You are able to inject the ILoggerFactory to your component (Controller, Service, etc.) and to create a named logger out of it. During testing you are able to replace this factory with a mock, to not test the logger as well, and to not have an additional dependency to setup.
Recently, we had the same requirement in a classic ASP.NET project, where we used Ninject to enable dependency injection and log4net to log all the stuff we did and all the exceptions. One important requirement was creating a named logger per component.
Maybe you’re wondering what a “web operating system" is? In order to explain that, we must take a look at a traditional operating system’s primary functions. The main task of an operating system is to provide a uniform way to access the underlying hardware, with the goal of simplifying the creation of applications. Hence, the "kernel" in an operating system, becomes an API which the developer can consume, to transparently access the underlying hardware of the machine. This is often referred to as "HAL," implying "Hardware Abstraction Layer."
An operating system also contains other functions – but the primary goal is to simplify the creation of apps for the end application developer, by abstracting away the "boring stuff," and making everything easier to use from an application development point of view.
Microsoft has recently announced the release of a new .NET web framework – Blazor. In this article, we will check out Blazor and set up a Blazor development environment on our machine and execute our first program in ASP.NET Core using Blazor and Visual Studio 2017. We will also create a sample calculator application using Blazor.
What Is Blazor?
Blazor is a new .NET web framework for creating client-side applications using C#/Razor and HTML that runs in the browser with WebAssembly. It can simplify the process of creating single page applications (SPAs) and at the same time enables full stack web development using .NET.
In this blog series, I’m going to create a small chat application using React and ASP.NET Core, to learn more about React and to learn how React behaves in an ASP.NET Core project during development and deployment. This Series is divided into 5 parts, which should cover all relevant topics:
React Chat Part 1: Requirements & Setup
React Chat Part 2: Creating the UI & React Components
React Chat Part 3: Adding Websockets using SignalR
React Chat Part 4: Authentication & Storage
React Chat Part 5: Deployment to Azure
I also set-up a GitHub repository where you can follow the project: https://github.com/JuergenGutsch/react-chat-demo. Feel free to share your ideas about that topic in the comments below or in issues on GitHub. Because I’m still learning React, please tell me about significant and conceptual errors, by dropping a comment or by creating an Issue on GitHub. Thanks.
Difference Between ViewData, ViewBag, and TempData With Code Examples
In this article, I will explain, with an example, the similarities and differences between ViewData, ViewBag, and TempData in ASP.NET MVC.
ViewData, ViewBag and TempData are used for transferring data and objects from the Controller to the View or from one Controller to another in ASP.NET MVC.
BitBucket provides a continuous integration tool called Pipelines. This is based on Docker containers which are running on a Linux-based Docker machine. In this post, I want to try to use BitBucket Pipelines with an ASP.NET Core application.
In the past, I preferred BitBucket over GitHub because I used Mercurial more than Git. But that changed five years ago. Since then, I’ve used GitHub for almost every new personal project that doesn’t need to be a private project. But at my company, YooApps, we use the entire Atlassian ALM Stack including Jira, Confluence, and BitBucket (we don’t use Bamboo yet because we also use Azure a lot and we didn’t get Bamboo running on Azure). BitBucket is a good choice if you use the other Atlassian tools because the integration to Jira and Confluence is awesome.
Microsoft .NET Core is a cross-platform, open source software development framework that can be used to build applications for mobile, Windows, and the web. You can learn more about .NET Core here, but in this blog post, we’ll walk you through how to create and publish a .NET Core application for Windows.
To work with .NET Core, first, you need to install it from here. While you can use any IDE to create a .NET Core application, I am going to use the Visual Studio 2017 Enterprise version. If you do not have Visual Studio installed, you may want to try the community edition, which can be found for free here. Once the environment is set, launch Visual Studio and create a new project by selecting File->New Project-> Visual C#-> .NET Core-> Console App. Besides C#, a .NET Core application can be used in other languages, like Visual Basic.
Every Wednesday, new courses and workshops are added to the growing Treehouse Library! Read more about the two new courses added this week and get the scoop on what’s coming later this month. Start learning to code today with your free trial on…
The post What’s New at Treehouse: Bootstrap 4 & ASP.NET appeared first on Treehouse Blog.