ASP.NET 5 beta 7

ASP.NET 5 beta 7 announced, What is new? Part – 3

As we already discuss some new features about ASP.NET 5 beta 7 in my previous post at

  1. ASP.NET 5 beta 7 announced, What is new? Part – 1

  2. ASP.NET 5 beta 7 announced, What is new? Part – 2

and, we are going to discuss more here.

ASP.NET 5 beta 7
What is new in ASP.NET 5 beta 7

Improvements and bug fixes in ASP.NET 5 beta 7

This blog post is the last post of the series of what is new in asp.net 5 beta 7. so, we are going to cover the rest of all things plus newly released WebHooks preview of ASP.NET family.

Razor
With the release of ASP.NET 5 beta 7, they had added the ability for a TagHelper to be written void element. The default value of CloseAfterOpeningTag will be false with the behaviors of IF there are multiple TagHelper working on a single HTML element.

When the user calls TagHelperContext.GetChildContentAsync it was uses cached the result, so in this release of ASP.NET 5 beta 7, they add an overload to reevaluate by passing useCachedResult to false in overload method.

Task<TagHelperContent> GetChildContentAsync()
{
    return GetChildContentAsync(true);
}

Task GetChildContentAsync(bool useCachedResult)
{
    ...
}

Another improvement in MVC is that, consider following Razor syntax with line comment.

<span> Here is your content</span>
@* this is just dummy content to demostrant improvement in MVC *@
 Here is your another content

This Razor syntax renders with carriage return something like,

<span> Here is your content</span>

<span> Here is your another content</span>

Instead of this it should have been rendered like

<span> Here is your content</span>
<span> Here is your another content</span>

They had also introduced single line comment like @//

Now, Rozar handling ~/ from its core and stripped out regardless its path or URL and auto attribute removal in TagHelper

Routing
Routing is just middleware for routing the request to application request. It sits between application request and files which are not present physically in your web application.

Security
ASP.NET security contains authentication, authorization and security middleware for ASP.NET only. ASP.NET security removed basic authentication due to its insecure and having performance issues. ASP.NET security has Data Protection API and integrates with most of the project like SignalR.

Session
In the previous version of asp.net, there was sluggish Session, which will degrade the performance of your application. Now, ASP.NET 5 support middleware for the session, and for that you just have to set up session database.

UserSecrets
While developing the modern web application, the programmer often saves oAuth secrets, and due to security risks they do not want to commit that file into source control. It’s more dangerous while working with open source projects using public source control system like Github.

The config file that is used in DNX based application that guide developer to not checking those resources to public source control.

WebHooks
WebHooks was not part of the initial release of ASP.NET 5 beta 7. Lately, WebHooks preview has been added to ASP.NET 5 family as of its simplicity and its lightweight HTTP based publish/subscribe pattern. When an event happens in service, HTTP based POST notification sent to the register subscribers. Post notification contains the information regarding events and that information is helpful for the receiver to act accordingly.

ASP.NET 5 WebHook Receivers
ASP.NET 5 WebHook Receivers

Due to its simplicity many organizers using it as APIs like Dropbox, Paypal, Slack, Instagram, Trello etc.

I will write more about all ASP.NET 5 features with more technical stuff including WebHooks in near feature. But due to the limitation of subject, I can’t include all topic in-depth. Thanks

ASP.NET 5 beta 7

ASP.NET 5 beta 7 announced, What is new? Part – 2

Microsoft ASP.NET team has released ASP.NET 5 beta 7. I have blogged already in my previous blog post about ASP.NET 5 beta 7 announced, What is new? Part – 1

ASP.NET 5 beta 7
What is new in ASP.NET 5 beta 7

Improvements and bug fixes in ASP.NET 5 beta 7

As we have discussed some of the improvements and bug fixes in my previous post. There are more improvements in ASP.NET 5 beta 7 and we are going to discuss here.

FileSystem
File provider abstraction for asp.net 5 runtime contains IFileInfo and IFileProvider.

Hosting
In this release of Microsoft ASP.NET 5 beta 7, they have improved the self-hosting capability and manageability. Self-hosting like OWIN decouple the application from the web server. It is just entry point when self-hosting an application.

HttpAbstractions
HttpAbstractions contains HTTP components like HttpRequest, HttpResponse, IBuilder and types required to create hosting pipelines.

With the release of ASP.NET 5 beta 7, HttpAbstractions has some improvements and bug fixes. There were changes like add new method HttpRequest.GetFullUrl() and merge FeatureModel and Features packages. There was also bug fix like NotImplementedExceptions when implementing IFeatureCollection.

Identity
ASP.NET Identity is the membership framework for building ASP.NET application with login features with user management.

In ASP.NET 5 beta 7 release, they have made property UserStore.Users as virtual, and fixes bug like custom IdentityErrorDescriber constructor hits at least 7 times per request.

KestrelHttpServer
KestrelHttpServer has a web server for ASP.NET 5 which is based on repo libuv. Kestrel now supports writing chunked responses automatically when no content length is specified for the response. Kestrel now uses write-behind buffering to efficiently write responses to the network. It has also improvements like add server headers like X-Powered-By, X-AspNet-Version into the response.

Localization
It has interfaces and implementations for providing localization support into your ASP.NET applications. It has a release for ASP.NET beta 7.

Logging
Logging provides common logging abstraction for ASP.NET 5. Some community framework like Serilog and elmah.io adapt Microsoft.Framework.Logging module and created Providers.

Microsoft.Data.Sqlite
This project contains implementation for System.Data.Common for SQLite to create data provider and binds to the native SQLite library. To use Microsoft.Data.Sqllite you have to install a sqllite library. The prerequisite to using Microsoft.Data.sqlliste is a version of Sqllite 3.7.15 and greater.

To use with Linux, you have to install “libsqlite3-dev”, because which is not installed by default. You can use the following command to install on Linux.

sudo apt-get install libsqlite3-dev

With ASP.NET 5 beta 7 there was obvious some bug fixes.

MVC (Model View Controller Framework for ASP.NET)
MVC provides you the ability to write clean, pattern based application, and dynamic application. It has the ability to write Test Driven Development application.

  • The release of ASP.NET 5 beta 7 has improvement like add IMvcBuilder overloads for localization and XML formatters.
  • Add URL resolving TagHelper to replace Razor.
  • Should be able to return ViewComponents from controller actions.
  • Some Dictionaries do not get model bound.
  • Make HTML rendering deferred (IHtmlContent)

You can find more improvements and bug fixes at GitHub

Options
You can configure and access setting of POCO with Options Framework.

The release of ASP.NET 5 beta 7 has more to discuss. So shortly, I will write more about ASP.NET 5 beta 7 in near feature.