ASP.NET Core and IIS

What does it means to host you application in IIS? To help with that there is new module called ASP.NET Core Module.   It’s native IIS module that forwards request to your application. It plugs into IIS, receive requests and then it’s forwarding this into process which we want to be started to handle that request. Module does all bunch of things like: Supports forwarding c…

By Dawid on (tags: ASP.NET, core, iis, categories: code)

ASP.NET Core – Implementing custom server

In previous blog post I’ve show you how to host ASP.NET Core application using Kestrel server. But why not to write our own server – in ASP.NET Core that is actually quite simple. Like show in previous blog post ASP.NET Core provide an extension method which specifies the Kestrel server will be used by the app (it creates the web server and hosts the code). But there is actuall…

By Dawid on (tags: ASP.NET, core, hosting, server, categories: code)

ASP.NET Core hosting

Hosting is how you get you ASP.NET application up and running. And ASP.NET Core is just bunch of libraries host in you own process. It’s not provide a hosting – user have to take care of providing hosting process. That gives us lot of possibilities and flexibility. Such application can be hosted in console application, windows service or everywhere you want – all you need to do…

By Dawid on (tags: ASP.NET, core, hosting, categories: code)

Secrets of project.json file

As you may already notice ASP.NET Core is using project.json files to controls almost all aspects of the project. It contains lot of section (which I will describe bellow) with full support of intellisense. That file is also synchronized with Solution Explorer – removing referenced from file will automatically update References node in Solution Explorer. Here is the list of pro…

By Dawid on (tags: ASP.NET, core, project.json, categories: code)

Entity Framework Core context in separate assembly

Most of example currently available on the internet shows how’s to start using ASP.NET Core and EF Core implemented in the same assembly. In the RC1 there was couple of tricks which we had to implement if we would like to have separate assembly with data model definition. In RC2 release it’s a little bit easier. Bellow I’ll show you how you can achieve that. This is our applica…

By Dawid on (tags: ASP.NET, context, core, ef core, categories: code)

How to obtain Content and Web roots paths in ASP.NET Core RC2

There are many situations that developer needs to known what are the content or web roots paths. One of such situations is accessing custom JSON configuration files. In the classics ASP.NET applications you was always able to use method. With that method you was able to find physical path or web root directory. Later on in RC1 there was possibility to use service. That’s not po…

By Dawid on (tags: core, .net, path, rc2, root, categories: code)

The dotnet Tool

In recently released .NET Core RC 2 there is possibility to use new tool. It exposes a set of commands , such us: creating empty projects restoring packages building your project unit testing .NET Core contains much more tooling but most of them are exposed thought tool. There is also no problem with extend set of commands. It has simple extensibility model – you can read more …

By Dawid on (tags: core, dotnet, .net, rc2, categories: tools, code)