CheapASPNETHostingReview.com| Best and cheap ASP.NET core 2.0 hosting. DiscountService and Expeed are two of the experienced Australia ASP.NET hosting providers. They both provide excellent hosting services with affordable price, outstanding performance, and quality support. Therefore, many customers have no idea to choose the right web host between DiscountService VS Expeed.. To pick up the better web hosting provider, we have worked out this DiscountService VS Expeed comparison, reviewing and comparing them comprehensively and thoroughly.
Expeed VS DiscountService
This DiscountService VS Expeed comparison is based on our real experience and referred to verified customer reviews, comparing DiscountService.biz and Expeed.com.au in terms of price & features, performance, reliability and support.
Expeed VS DiscountService – Australia ASP.NET Hosting Price
Expeed.com.au releases four shared hosting plans called Medium, Large, X-Large and XX-Large. The sale prices of them are $10, $20, $40 and $60 if you purchase them monthly. If you choose 1 year term, the price of the plans will reduce into $100/year, $20/year, $40/year and $60/year.
DiscountService.biz launches Beginner, Economy, Proffesional and Business the price of the primary package is lowered to $2.99/mo35% OFF, $9.29/mo35% OFF , $19.99/mo35% OFF and $29.99/mo35% OFF if you purchased 5 years billing. Likewise, three billing cycles are offered, including 3-month term, 12-month term and 5-month term. By the way, this company also supports 30-day money back.
Expeed VS DiscountService – Australia ASP.NET Hosting Features
Expeed.com.au and DiscountService.biz both provide excellent Australia shared hosting services, but they have some differences on specific details. In below, we have compiled a comparison table about the features of Expeed.com.au VS DiscountService.biz To compare the features, we took the Large plan features from Expeed.com.au and professional features from DiscountService.biz, because both of plans has the same price.
As you can see, DiscountService.biz has more features than Expeed.com.au. Besides the larger amount of disk space and monthly data transfer, DiscountService.biz also provides all version of Microsoft development tools which are helpful for you to build website such as ASP.NET, ASP.NET MVC and PHP all versions. With regard to the control panel, Expeed.com.au adopts WebSitePanel while DiscountService.biz utilizes Plesk to offer services. And the two companies support 1-click installation which is convenient for webmasters to build up their websites. However, Expeed.com.au offers unlimited email accounts while DiscountService.biz only gives you 500 MB email space on the same price ASP.NET hosting package.
Expeed VS DiscountService – Australia ASP.NET Hosting Performance & Reliability
Expeed.com.au is a company who tries their best to realize 99.9% uptime. To make everything smooth, the network of this company is under 24×7 monitoring by many experienced engineers. The uptime of this company is good, but many of their customers have been complaining about the slow speed of servers.
Having been offering Australia ASP.NET hosting for many years, DiscountService.biz has received trust and popularity from thousands of webmasters in Australia. This company powers their accross the globe data centers (Melbourne (Australia), London (UK), Washington (US) and Singapore) with high performance network infrastructures and servers, redundant connections and handprint entry system. Therefore, DiscountService.biz keeps an average of 99.99% uptime during our continuous monitoring process.
The following performance comparison about Expeed.com.au VS DiscountService.biz indicates that the former has a better performance than the other. You can see from the chart that the server response time of DiscountService.biz is 317ms while Expeed.com.au needs more time to make a response.
Expeed VS DiscountService – Australia ASP.NET Hosting Technical Support
Seasoned webmasters know that a webhost is only as good as their customer support. It is inevitable that you will require assistance at some point, so it pays to consider the support options and policies offered by potential hosts. n terms of customer service, both Expeed.com.au and DiscountService.biz guarantee to provide friendly and professional customer service via email and tickets. Obviously, the technical support is available 7 days a week and 24 hours a day. The two companies own a team of experienced and professional technical staffs who can offer offhanded assistance no matter when you need.
But when it comes to phone service, Expeed.com.au offers you phone call support from Monday to Friday (9am – 5pm). While DiscountService.biz doesn’t provide you phone service, they’re still always be there for you 24/7 via live chat and ticketing system. Even everyone is on holiday, they’re always behind their desk serving their customers.
Conclusion – Who is The Best Cheap Australia ASP.NET Hosting?
On the basis of what we talked above, it’s not a difficult task to conclude that DiscountService.biz is a better choice if you are looking for richer features and more powerful performance of Australia ASP.NET Hosting. DiscountService.biz can satisfy the needs of most webmasters who attach great importance on fast page loading speed. It offers affordable price and quicker server response.
CheapASPNETHostingReview.com | Best and cheap ASP.NET core 2.0 hosting. ASP.NET, as a free and powerful framework, is highly recommended to build great web sites. Since a large number of web hosting providers swarm into ASP.NET hosting market, there are abundant options in front of people.
After reviewed 80+ Windows ASP.NET hosting, we had come out with the best Windows ASP.NET hosting, Microsoft control libraries, databases, Microsoft technical support, and web hosting price. To make your buying decision easy we have the Windows ASP.NET Hosting providers which are reliable and offer Cheap Windows ASP.NET Hosting so that everyone can afford it.
ASP.NET Core 2.0 Hosting – HostForLIFE.eu VS StarLogic
HostForLIFE.eu Windows ASP.NET hosting is Microsoft No #1 Recommended Windows and ASP.NET 5 / ASP.NET Core 1.0 Hosting in European Continent. They proudly announce that they are the leader in ASP.NET 5 / ASP.NET Core 1.0 Hosting Technology. They have provided a wide-range of ASP.NET service, starting from the Classic ASP, ASP.NET1.1 Hosting, ASP.NET 2 Hosting, ASP.NET 3.5 Hosting, ASP.NET 4 Hosting, ASP.NET 4.5 Hosting, ASP.NET 4.5.1 Hosting, ASP.NET 4.5.2 Hosting, ASP.NET 4.6 Hosting and the latest ASP.NET 5 / ASP.NET Core 1.0 Hosting.
Startlogic is one of the biggest shared hosts around, with years of experience. They do offer diverse plans and prices are competitive. Startlogic obviously is looking for large user base to to make sense of their pricing.
HostForLIFE.eu VS StarLogic Hosting Features
HostForLIFE.eu Windows ASP.NET hosting releases four plans called Classic, Budget, Economy and Business at the prices of €3.00/month, €5.50/month, €8.00/month and €11.00/month if you choose annual payment method. Three billing cycles with different prices are available in HostForLIFE.eu best ASP.NET hosting package. You can choose between 3-months, 1-year and 3-years payment methods. HostForLIFE.eu also supports 30-days money back. On the contrary, Host-It.co.uk offers Starter, Bronze, Silver and Gold plans with £5.24/month, £7.43/month, £9.38/month and £11.24/month if you choose 3 years payment method.
StartLogic offers three shared hosting plans.
● PersonalLogic is a limited, low-cost plan marketed a beginners. Pro Logic is effectively an upgrade to that plan which includes free gifts, unlimited resources and eCommerce tools. Pro Logic also allows customers to host unlimited domains. Both appear to be Linux-based.
● The WindowsLogic plan is an equivalent to the ProLogic plan, but provided on Windows 2003 server. Customers can host unlimited domains on WindowsLogic.
In addition to shared hosting, StartLogic offer three VPS hosting plans: VPSLogic, VPSLogic Pro and VPSLogic Premium. The amount of disk space, bandwidth and memory increases with the price, as does the number of domains that can be hosted. All plans include one IP address.
HostForLIFE.eu VS StarLogic Hosting Uptime
HostForLIFE.eu Windows ASP.NET hosting currently operates data center located in Amsterdam (Netherlands), London (UK), Washington, D.C. (US), Paris (France), Frankfurt (Germany), Chennai (India), Milan (Italy), Toronto (Canada) and Sao Paulo (Brazil) Data Center. All their data center offers complete redundancy in power, HVAC, fire suppression, network connectivity, and security. Their data center has over 53,000 sq ft of raised floor between the two facilities, HostForLIFE has an offering to fit any need. The datacenter facility sits atop multiple power grids driven by TXU electric, with PowerWare UPS battery backup power and dual diesel generators onsite. Their HVAC systems are condenser units by Data Aire to provide redundancy in cooling coupled with nine managed backbone providers.
EIG-owned web hosting companies generally don’t provide any uptime guarantee, and it appears that StartLogic is no different. The company does not publish an uptime statistics either.
StartLogic’s data centres are located in Boston, MA in the USA. It appears that the company doesn’t own them itself. In total, the two data centres contain 800 Dell servers, The data centre specification is fairly standard, and security is provided on-site 24/7. Both facilities run in N+1 power and utilise redundant routers, two firewalls and clustered server technology.
HostForLIFE.eu VS StarLogic Hosting Support
HostForLIFE.eu award-winning supporting team is ready to help people around the clock. People can search help via 24/7 live chat, tickets and email. What’s more, the supporting staffs are professionals with Networking and Computer Science degree. Even experienced senior networking technicians and software developers are responsible for answering questions. What’s more, HostForLIFE.eu also provides you knowledgebase includes web hosting article and tutorial to help you solve the hosting problem. While the support department at StartLogic is open round the clock, with support offered via live chat and telephone (via a US toll-free number). It’s not clear where the support team are physically located. StartLogic’s support portal is pretty much identical to other EIG-owned hosts’ support areas, with a knowledgebase, user guide and tutorials. The support information provided is fairly basic, but would suffice for a beginner.
Recommendation ASP.NET Core 2.0 Hosting
As shared web hosting, StartLogic is a fairly standard, unremarkable host. The company that owns StartLogic, EIG, is truly massive, and many of their hosting companies are almost uniform in the hosting products they offer. StartLogic is no different. Across the board, their shared plans are very similar to their competitors’. Features and pricing are all quite standard, and support is also a carbon copy of other EIG hosts’ sites. So, for reliable Windows ASP.NET Hosting, we would recommend HostForLIFE.eu.
CheapASPNETHostingReview.com | Best and Cheap ASP.NET Core 2.0 hosting in India. Compare the web hosting plans of popular web hosting providers with that of CheapASPNETHostingReview.comwith this most elaborate list of feature comparison and check out how we stack up against them.
To choose the best Windows hosting for your websites, we will compare two of this India Windows hosting providers in the industry. This WindowsASPNETHosting.in VS Square Brothers comparison is about to make clear that who is a better option for India Windows hosting. We will focus on their plans, performance, customer service and technical support which have been tested and proven by our Microsoft professionals.
Overall India ASP.NET Core 2.0 Hosting Review
Item
WindowsASPNETHosting.in
Square Brothers
Price
*****
****
Features
*****
*****
Uptime
*****
****
Speed
*****
**
Technical Support
*****
***
WindowsASPNETHosting.in is the India’s #1 Windows hosting provider that offers the most reliable world class Windows hosting solutions for customers. WindowsASPNETHosting.in provides high quality affordable India’s Windows hosting services for personal and companies of all sizes. You can host your website with an innovative, reliable, and a friendly India’s Windows hosting company who cares about your business.
Square Brothers has been working in web hosting fieldfor eight years. At this time, they are providing servers and web host to more than 33000 domains. They are providing now web hosting on Linux, Window, Window reseller hosting, Linux Reseller hosting, VPS Hosting. They are situated in Chennai, Tamil Nadu. Their main motive is appeasement of costumers. They also treat their costumer as family member and costumer’s trouble as their own trouble.
WindowsASPNETHosting.in VS Square Brothers: Pricing & Features
WindowsASPNETHosting.in releases four plans called Personal, Developer, Business and Expert at the prices of INR 159.99/month35% OFF , INR 299.99/month35% OFF , INR 679.99/month35% OFF andINR 1099.99/month35% OFF . Three billing cycles with different prices are available in WindowsASPNETHosting.in best India Windows hosting package. You can choose between 3-months, 1-year, 3-years and 5-years payment methods. WindowsASPNETHosting.in also supports 30-days money back guarantee. On the contrary, Square Brothers offers several kinds of India Windows hosting plan starting from INR 999/year in regular time. Square Brothers only provide the costumers yearly payment method.
In below, we create a feature-comparison table of this two best India ASP.NET Core 2.0 hosting companies:
From the above comparison list, both of them are fully ASP.NET compatible. However, WindowsASPNETHosting.in and Square Brothers are different from each other in many features. They both support the .NET technology, like Windows Server, IIS, isolated application pool, LINQ, AJAX, Silverlight, Full Trust, URL rewrite module. But WindowsASPNETHosting.in supports almost all version of Windows Server, ASP.NET, ASP.NET MVC, IIS and MSSQL database. WindowsASPNETHosting.in also supports ASP.NET 4.6 hosting with affordable price. What’s more WindowsASPNETHosting.in also provides unlimited domain while Square Brothers still limit their domain. From the above table, we can conclude that WindowsASPNETHosting.in has more rich-featured India Windows hosting that what Square Brothers has offered.
WindowsASPNETHosting.in VS Square Brothers: Uptime & Speed
To ensure uptime and speed, both WindowsASPNETHosting.in and ewebIndia have been investing much money and time. WindowsASPNETHosting.in leverages best-in-class connectivity and technology to innovate industry-leading, fully automated solutions that empower enterprises with complete access, control, security, and scalability. They own and operate three world-class data centers strategically located in Mumbai (India), London (UK) and Washington D.C.(US). WindowsASPNETHosting.in promise you in delivering 99.9% uptime. When it comes to Square Brothers, they also located their data center in Chennai, Tamil Nadu and promise 99.9% uptime guarantee. However, most of Square Brother’s costumers are disappointed because of their slow speed website.
WindowsASPNETHosting.in VS Square Brothers: Technical Support
WindowsASPNETHosting.in offers 24/7 support through tickets, e-mail and contact form. When we contacted the their support representatives via e-mail, we got responses from WindowsASPNETHosting.in within an average of 5 minutes. In the other hand, Square Brothers only provide phone call for their costumer. We’ve tried to call their support but they always show the busy tune. We do believe that WindowsASPNETHosting.in has more responsive support team.
Conclusion: WindowsASPNETHosting.in VS Square Brothers?
From the combination of high performance, responsive support, rich-featured hosting and reasonable pricing, we conclude that WindowsASPNETHosting.in is better in serving India Windows hosting. It is clear that WindowsASPNETHosting.in is a more favorable choice due to its cost-effective features and considerate customer service.
CheapASPNETHostingReview.com | Best and cheap ASP.NET Core 2.0 hosting. Microsoft created and open-sourced ASP.NET as a server-side web application framework for developers to create dynamic web properties. If you’re looking for a Windows host to help you launch such a project, you’ve come to the right place. Here, our developers have thoroughly reviewed the top providers of shared hosting for Windows and ASP.NET users, specifically noting framework version compatibility, uptime rates, and storage, among other features that are mission-critical for this particular niche of developers.
HostForLIFE.eu is the leader in ASP.NET 5 / ASP.NET Core 1.0 /2.0 Hosting Technology. HostForLIFE have provided a wide-range of ASP.NET service, starting from the Classic ASP, ASP.NET 1.1 Hosting, ASP.NET 2 Hosting, ASP.NET 3.5 Hosting, ASP.NET 4 Hosting, ASP.NET 4.5 Hosting, ASP.NET 4.5.1 Hosting, ASP.NET 4.5.2 Hosting, ASP.NET 4.6 Hosting and the latest ASP.NET 5 / ASP.NET Core 1.0 Hosting.
HostForLIFE.eu
HostForLIFE has been recognized as one of the best ASP.NET Core 2.0 hosting For people who are unsatisfied with the services, HostForLIFE offers a 30 day money back guarantee allowing the clients to cancel their accounts within the first 30 days and getting a full refund. When it comes to the payment, two payment methods are available including CC and PayPal to ensure that every client reaches the services in a convenient way.
Recommended: We highly recommend you to host your ASP.NET website or application on HostForLIFE.eu web hosting. This website is also hosted with HostForLIFE and we’re sure you must have noticed the speed. You can also take advantage of HostForLIFE’s special promotion offer and can buy cheap ASP.NET (Windows) Hosting with Unlimited Bandwidth.
Affordable price for a High availability solution
Built on enterprise-grade hardware
24/7/365 Customer Care & Support
99.9& Uptime Guarantee
Dedicated App Pool
Amsterdam (NL) , London (United Kingdom), Paris (France), Frankfurt (DE) and Seattle (USA) Data Center
Best “ASP.NET Core 2.0 Hosting” Providers
We highly recommend you to buy HostForLIFE.eu’s ASP.NET core 2.0 Hosting (Windows Hosting) for better performance & reliablity. HostForLIFE.eu’s ASP.NET hosting is Cheap and Unlimited only cost €3.49/mo15% OFF with Unlimited domain, Disk Space, and Bandwidth.Click Here To Know More about HostForLIFE.eu.
Reasons to host with HostForLIFE ASP.NET Core 2.0 Hosting recommendation :
Windows OS: the latest version of Windows OS is the key point of a quality ASP.NET hosting solution. And now, the best choices are Windows Server 2012R2, Windows Server 2012 and Windows Server 2008R2. In fact, all the recommended hosting companies support the mentioned Windows operating systems.
ASP.NET Frameworks: as ASP.NET websites have to run in the corresponding .NET framework, it’s better that the web host can support most of frameworks from v1.1 to v4.0. In this case that you can have maximum flexibility for you websites and keep the possibility upgrading to the higher version.
ASP.NET Trust Level: it’s configured for each website by .net infrastructure. you should know the exact configuration before the payment. in our research, 70% websites can be run only under the fully trust level. if your hosting company doesn’t tell that they support fully trust, you should be careful that your website may not run correctly in the host finally. surely, you can ask for money back but it’s time wasting.
RAM: this is the maximum memory in the server that can be used for your site, which is configured in IIS application pool. Only sufficient RAM allocation can bring the website a reliable hosting condition.
MSSQL Edition: MSSQL makes a big difference to store all data from the website, which is a Windows based database. Note that, the latest version of MSSQL is the SQL Server 2012.
Control Panel: Plesk is the best reliable control panel for asp.net web hosting but PleskPanel is the best visual and easy-to-use control panel these two control panels are both fine in our opinion.
Add-on Features: the installation required third party libraries are important when your website depends on then. E.G. Chat controls library, Altas library and more.
knowledge of Microsoft technology support: you can easily call the technical support of the web host and ask some technical questions about ASP.NET website configuration and deployment. This is certainly important especially when you have a problem in the future.
CheapASPNETHostingReview.com | Best and cheap ASP.NET Core 2.0 hosting. It has only been about a year since .NET Core 1.0 RC came out. We are now getting close to .NET Core 2.0. We have been playing with .NET Core since the betas and feel like the quality of the 1.0 runtime was very good. Our only complaint has really been odd Visual Studio behavior. We would expect that with 2.0, the adoption is likely to skyrocket.
Improvements with .NET Core 2.0
We have made many improvements as part of the .NET Core 2.0 Preview 1 release. The improvements are the result of the vision for .NET Core 2.0: Enable you to use more of your code in more places.
Enabling you to use more of your code
Developers we have talked to want more APIs and to make it easier to use existing .NET Framework code. We’ve also heard many requests to use more .NET languages.
The following improvements are included in .NET Core 2.0 Preview 1:
Massive API increase (>100%) relative to .NET Core 1.x.
Support for .NET Standard 2.0.
Support for referencing .NET Framework libraries and NuGet packages.
Support for Visual Basic.
Cheap ASP.NET Core 2.0 Hosting with 35% OFF in UK
Nowadays, anybody can afford to order a feature-packed web hosting plan for next to nothing; however, affordable price is not the only criterion which should be considered when purchasing web hosting services. The basics of what you should look for in choosing a web hosting company, not just concentrating on the best price and features, but also on reliability and honesty. You’re investing your money and effort into finding paying customers and you wouldn’t like to lose them in order to save a few dollars per month on a web hosting service. In this article review, we will discuss hosting provider that provide cheap Entity Framework on their hosting environment.
As the industry best cheap ASP.NET Core 2.0 hosting provider in UK, UKWindowsHostASP.NET hosting solution is much cheaper than other competitors’ ones. Customers just need to pay from £2.99/month + 35% OFF with the latest ASP.NET Core 2.0. And if customers spend £5.99 + 35% OFF, they will get UKWindowsHostASP.NET popular Advance ASP.NET Core 2.0 hosting plan, which regularly requires £8.99 + 35% OFF OFF. and £16.99 + 35% OFF. Visit and buy the latest EF with UKWindowsHostASP.NET.
In addition, another good aspect to go with UKWindowsHostASP.NET is 30-Day Money Back Guarantee there. When people cancel their accounts within that period, they will absolutely take their money full back.
About UKWindowsHostASP.NET
UKWindowsHostASP.NET is a fast growing company just serving for .NET users. From the time it was founded, it keeps one core that offering customers affordable and quality. Besides traditional web hosting, UKWindowsHostASP.NET also offer many advanced options like SSD to meet the needs from customers who wants to enjoy a super fast page loading experience.
So, what is changing with .NET Core 2.0?
1. Release Date
Keep an eye on the .NET Core roadmap over at GitHub. It currently says Q2 for a preview/RC type release and Q3 for general availability. I would expect the 2.0 preview to be launched at Microsoft Build 2017.
Visual Studio 2017 was released in March 2017. As part of that, there was a bunch of .NET Core tooling improvements along with the new csproj file format.
2. .NET Standard 2.0 Expanded APIs & the Ability to Reference Full Framework Libraries
.NET Standard 2.0 will broaden the set of APIs available to include a lot of the missing features. It sounds like 2.0 will make virtually all full framework APIs available. Some popular complaints were System.Drawing, DataTables, and others. You can search the code of over on GitHub to see the changes. Isn’t open source awesome?
One of the biggest problems with .NET Core was the lack of third party libraries. For example, when 1.0 came out, popular logging libraries like log4net were not even available (it is now). However, this was really only a problem if you wanted to deploy your app on Mac or Linux. You could have used .NET Core and targeted full .NET framework and not had these issues.
.NET Standard 2.0 has added a new compatibility shim that will enable any .NET Core app to reference any full framework library.
3. Expanded OS Support
One of the big goals with .NET Core is portability across multiple operating systems. Including desktops, servers, and even mobile. Microsoft, and the community, continue to expand the support of .NET Core. Look for the next version to continue expanding support of common Linux distros. Samsung is even working to provide support for the mobile OS Tizen.
4. Other Improvement Themes
On GitHub, the team lists these themes as being central to .NET Core 2.0.
.NET Core Tooling – Further tooling improvements in Visual Studio
Performance – The .NET team and community seems to be up to the challenge for ensuring .NET Core is the fastest application runtime available.
.NET Core and Cloud – Improve how to deploy apps to Azure and troubleshoot application problems.
Build from Source – Ability to clone the actual .NET Core source code repository and build it!
CheapASPNETHostingReview.com| Best and cheap ASP.NET Core 2.0 hosting. At Build 2017, there were a lot of new features announced for ASP.NET Core 2.0, .NET Core 2.0 and .NET Standard 2.0.
Today, we’re going to look at a few of the changes, specifically: the new configuration model and Razor Pages
Configuration
A lot of the changes that the ASP.NET Core team have brought to ASP.NET Core 2.0 are all about taking the basic application setup and making it as automatic, and quick and easy to change as possible. The first and easiest way that they have done this is by creating the AspNetCore.All package.
AspNetCore.All Package
In previous versions of ASP.NET Core when we’ve created an application and wanted to add in functionality, we’ve had to search on NuGet or using the Package Manager to find the NuGet packages for the functionality that we want.
The AspNetCore.All package is a meta package which pulls down all of the relevant (Anti Forgery, Auth, Entity Framework Core, MVC, Static files, etc.) packages to our application when package restore happens.
Because we no longer have to track down each of these individual packages, our job is made easier. Also, when the packages within the AspNetCore.All package are updated, the updated versions will be included in the AspNetCore.All meta package.
The AspNetCore.All package is included in .NET Core 2.0’s Runtime Store, and is compiled to native code, rather than IL. This means that all of the libraries included in the AspNetCore.All package are pre-compiled as native binaries for the Operating Systems that .NET Core 2.0 supports.
Boot Time Improvements
Dan and Scott were able to show that ASP.NET Core 2.0 applications can cold boot in less than a second, versus up to 7 seconds for ASP.NET Core 1.0 applications.
The ASP.NET Core team have achieved this by shipping the AspNetCore.All package in native code for each platform, and by enabling view pre-compilation. By pre-compiling the views, they no longer have to be compiled at start up.
View pre-compilation is a trick that has been around in .NET Framework for a while, but it isn’t a default build action.
New Program Setup
This leads me nicely onto the new program setup model.
In ASP.NET Core 1.0 the program.cs file contained a single method for configuring and running the server, and there was a lot of manual configuration required. As in the following code block:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
namespaceaspNetCoreOneDemo
{
publicclassProgram
{
publicstaticvoidMain(string[]args)
{
varhost=newWebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
}
}
To enable server features, you had to know what those features where called or rely on intellisense in order to find the right methods.
But in ASP.NET Core 2.0, a lot of the configuration is taken care of for us. So much so that the following code snippet is the default program.cs for an ASP.NET Core 2.0 application:
There’s a lot that’s changed here, so let’s look at the changes in turn.
The Constructor and DI
Taking a look at the constructor, we can see that the configuration is Dependency Injected in for us.
1
2
3
4
5
6
7
8
9
10
namespaceAspNetCore2Demo
{
publicclassStartup
{
publicStartup(IConfiguration configuration)
{
Configuration=configuration;
}
publicIConfigurationConfiguration{get;}
This is because all of the explicit configuration that we had to do in ASP.NET Core 1.0 is done automatically for us. ASP.NET Core 1.0 will look for any and all relevant json/ini files and attempt to deserialise them to objects for us and inject them into the IConfiguration object.
The ConfigureServices method is pretty much the same, but the Configure method has been very simplified:
This is because the contents of the appsettings.json are parsed and added into the IConfiguration object which is injected in at the constructor level of the class:
1
2
3
4
5
6
7
8
publicclassStartup
{
publicStartup(IConfiguration configuration)
{
Configuration=configuration;
}
publicIConfigurationConfiguration{get;}
If we take a look at the appsettings.json, we can see that the logging is set up for us there:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"Logging":{
"IncludeScopes":false,
"Debug":{
"LogLevel":{
"Default":"Warning"
}
},
"Console":{
"LogLevel":{
"Default":"Warning"
}
}
}
}
And looking at the highlighted lines, we’ll see that logging is set up so that we’ll only get warnings. This can be proven by running the application from the terminal. Doing so, and navigating around in the application, you won’t receive any messages in the terminal other than warnings:
1
2
3
4
5
$dotnet run
Hosting environment:Production
Content root path:/AspNetCore2Demo
Now listening on:http://localhost:5000
Application started.Press Ctrl+Ctoshut down.
However, if we edit the appsettings.json file to match the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
"Logging":{
"IncludeScopes":false,
"Debug":{
"LogLevel":{
"Default":"Information"
}
},
"Console":{
"LogLevel":{
"Default":"Information"
}
}
}
}
Then re-run the application and click around, we’ll see the familiar log messages again:
Its entirely up to the developer and their needs as to which level of logging they require. I prefer information logging when I’m developing and to switch to warnings once I’ve published, but your requirements may be different.
Razor Pages
The other big new thing in ASP.NET Core 2.0 is the concept of Razor Pages. Razor Pages are enabled by default, as they are a feature of MVC, thus the following line in the startup.cs enables them:
Razor Pages cover the situations when creating a full blown Controller, View and a Model for a single or small number of pages seem a little over kill. Take for instance a simple homepage with no controller required, presumably something which could be handled by a static page, but which should have a simple model.
An example of this can be seen in the ASP.NET Core Web App (Razor Pages) template, which is installed as part of the .NET Core 2.0 preview1:
ASP.NET Core Web App(Model-View-Controller)mvc[C#], F# Web/MVC
ASP.NET Core Web App(Razor Pages)razor[C#] Web/MVC/Razor Pages
ASP.NET Core Web API webapi[C#] Web/WebAPI
Nuget Config nugetconfig Config
Web Config webconfig Config
Solution File sln Solution
Razor Page page Web/ASP.NET
MVC ViewImports viewimports Web/ASP.NET
MVC ViewStart viewstart Web/ASP.NET
Taking a look at the directory structure for this new template, we can see that the new Razor Pages are located within the Pages directory.
Routing
Before we take a look at the contents of one of the Razor Pages, it will be worth covering how the routing for Razor Pages works. The request URL for a Razor Page is mapped to it’s path within the Pages directory – the Pages directory being the default location which the Runtime checks for any Razor Pages which could match the requested URL.
The following table shows a few examples of how the location of Razor Pages maps to requests: