(This article also published in my public number "dotnet daily Essence article", Welcome to the right QR code to pay attention to. )
Preface: ASP. NET 5 Beta8 is an important milestone because this is the feature freeze version of ASP. It is strongly recommended that students who have hesitated to use ASP. NET 5 in the production environment can start experimenting.
This time as a function of the frozen version, the change relative to the Beta7 still have a lot of places.
The biggest change is to change the IIS hosting model
The previously managed mode was "both camps", and there was a host named "Helios" for IIS, in addition to the DNX host. This approach brings the complexity of development, maintenance, and testing, and also makes the internal processes of the program execution different. There is now only one DNX host, and if you want to run in IIS, you need a new Httpplatformhandler to pass the request to the Kestrel server in ASP. NET 5.
If this extension of IIS is iisexpress, you can install the BETA8 Web Tools update to get it, if not you need to install it separately.
In addition, for the old project also need to add a Web. config in wwwroot, the specific content can be seen at the end of the link or a new project with BETA8 to reference.
Next is the functionality that localization supports.
Use the app. Userequestlocalization when localization is enabled, the built-in language judgment provider will determine the current language based on the request header, query string, or cookie value. You can then use services. Addlocalization (options = options. Resourcespath = "Resources"), to pass localized string content.
Of course, the localization of MVC has also been supported.
DNX Watch command for dynamic development.
Although. NET is to support dynamic compilation, to achieve dynamic development such as Ruby, Python (that is, after the production environment modifies or pushes code, the program runs in the latest version) or need to do some additional work (or choose a framework such as webpages). The DNX Watch command is now available in ASP. NET 5 to monitor changes in all files in the project, enabling a fast development workflow: Edit the code, save it, and then refresh the browser to see the update.
Installation mode: DNU commands install Microsoft.Dnx.Watcher
Execution mode: Dnx-watch Web
In addition to these enhanced above, more can be found in the announcement and release notes of Beta8 :
Http://blogs.msdn.com/b/webdev/archive/2015/10/15/announcing-availability-of-asp-net-5-beta8.aspx
Https://github.com/aspnet/Home/releases/tag/v1.0.0-beta8
Upgrade from Beta7 Beta8
Of course, the whole beta8 also brought some disruptive changes, and I combined my experience of upgrading from BETA7 to a brief introduction:
Targetelementattribute renamed to Htmltargetelementattribute
Use stringvalues instead of string[] For example, when visiting HttpContext.Request.Header, the wording is different.
The Useerrorhandler and Useerrorpage extensions were renamed, which is useerrorhandler->useexceptionhandler,useerrorpage-> Usedeveloperexceptionpage
Controller.context-Controller.httpcontext
Openidconnectauthenticationdefaults-Openidconnectdefaults
ActionExecutedContext namespace changed to Microsoft.AspNet.Mvc.Filters
Ioptions.options-Ioptions.value
Identityoptions.emailconfirmationtokenprovider-IdentityOptions.Tokens.EmailConfirmationTokenProvider
The controller provides such as user, request properties, and does not have to be accessed indirectly through HttpContext, but is closer to MVC5 controller usage
Identityservicecollectionextensions.configureidentity removal, configuration put into addidentity; Configureidentityapplicationcookie removal, configuration via IdentIT Yoptions's Cookie property configuration
Memoryconfigurationsource–>memoryconfigurationprovider
The Configurationbuilder constructor adjusts to no longer accept incoming basepath values, which is required: var configurationbuilder = new Configurationbuilder (). Setbasepath (Appenv.applicationbasepath)
More changes to the record can be seen here: https://github.com/aspnet/Announcements/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0.0-beta8
BETA8 Web Tools downloads in: http://www.microsoft.com/en-us/download/details.aspx?id=49442
ASP 5 BETA8 release and upgrade experience