ASP.NET Core 1.0 Hosting Tutorial – How To Find & Use Session in ASP.NET Core 1.0

If you’re just starting to develop in ASP.NET, you may not have encountered Session before. Session is a serialized collection of objects that are related to the current user’s session. The values are usually stored on the local server memory, but there are alternate architectures where the values can be stored in a SQL database or other distributed storage solutions, especially when your servers are part of a server farm. In this tutorial, we will show you how to find and use session in ASP.NET Core 1.0.flat-vector-design-illustration-of-modern-business-office-and-workspace-600x500

Finding Session in ASP.NET Core 1.0

ASP.NET Core 1.0 has been written from the ground up to be a modular, choose-what-you-need framework. What this means is that you must explicitly include any packages you want to use in your project. This allows developers to maintain tight control over what functionality our ASP.NET Core projects actually need, and exclude anything that is not necessary.

Step 1

Session is considered to be one of “additional” packages.  In order to include that package we need to add a reference to Microsoft.AspNet.Session in the project.json file. If we wanted to use memory as our caching backend, we would also include Microsoft.Extensions.Caching.Memory.

Finding Session in ASP.NET Core 1.0 (1)

Step 2

Once we’ve got the package included in our project, we need to make it available to the Services layer by modifying the ConfigureServices() method in the Startup file, like so:

Step 3

However, that isn’t quite enough to get Session fully integrated into our project. We also need to inject the Session service into our Dependency Injection container in the Startup file’s Configure() method, like so:

With all of these steps completed, you can now use Session in your projects just like in any other ASP.NET application. If you wanted to use a different cache backend (rather than memory) you could grab a different NuGet package like Redis or SqlServer. Don’t forget to check NuGet if you can’t find the functionality you need; it is probably there and you just need to download it.

Using Session in ASP.NET Core 1.0

ASP.NET Core 1.0 has introduced some new extension methods that we can use for accessing and storing Session values. The odd thing is that these extensions are not in Microsoft.AspNet.Session; rather, they are in Microsoft.AspNet.Http, and so we will need to add that package.

Using Session in ASP.NET Core 1.0 (1)

Once we’ve got that package included, we can start using the extension methods:

The new extension methods are:

  • Get: Returns a byte array for the specified Session object.
  • GetInt: Returns an integer value for the specified Session object.
  • GetString: Returns a string value for the specified Session object.
  • Set: Sets a byte array for the specified Session object.
  • SetInt: Sets an integer value for the specified Session object.
  • SetString: Sets a string value for the specified Session object.

Best and Recommended ASP.NET Core 1.0 Hosting

If you are looking at creating website of your own, hosting it with ASP.NET Core 1.0 can be a great choice. While there are various companies today who offer you ASP.NET Core 1.0 hosting services, it is extremely important for you to understand and compare the features that various companies offer. To make this search easier for you, we have listed down top 3 hosting providers which you need to compare for the best and recommended ASP.NET Core 1.0 hosting.

Best & Cheap ASP.NET Core 1.0 Hosting Comparison in UK – UKWindowsHostASP.NET vs VidaHost

There are several web hosting platforms to choose from, but Windows is becoming a popular choice among individuals and organizations alike. In recent months, we find that UKWindowsHostASP.NET and VidaHost are taken into the consideration of many people and both of them are supporting Windows ASP.NET Core 1.0 hosting. To choose the best Windows hosting for your websites, we will compare two of this India Windows hosting providers in the industry. This UKWindowsHostASP.NET VS VidaHost comparison is about to make clear that who is a better option for India Windows ASP.NET Core 1.0 hosting. We will focus on their plans, performance, customer service and technical support which have been tested and proven by our Microsoft professionals.

stylish-man-looking-at-computer-1

ItemUKWindowHostASP.NETVidaHost
Price
Features
Uptime
Technical Support

UKWindowsHostASP.NET VS VidaHost Comparison – Who is the Best,Reliable & Cheap ASP.NET Core 1.0 Hosting?

VidaHost is a UK based hosting company that offers a variety of different hosting options to their customers. They only have 24,000 customers, which makes them smaller than many other hosting companies, but this will be seen by many as a good thing. They focus primarily on cloud hosting solutions, but also have fully dedicated servers available for those who want to go that route. Even their entry level packages are cloud based, which will provide for added reliability, even for those who are used to shared options.

ukwindowsasp.netUKWindowsHostASP.NET has expanded their hosting field for almost a decade. UKWindowsHostASP.NET is reputed hosting provider who is famous for their affordable hosting solution and professional technical support. They offers an affordable world class Windows ASP.NET hosting & SQL Server hosting solutions in United Kingdom. Nowadays, UKWindowsHostASP.NET comes with their new offering, free ASP.NET hosting package. So, you don’t have to pay any charge for enjoying their world class ASP.NET hosting services.

UKWindowsHostASP.NET VS VidaHost : Pricing & Features

UKWindowsHostASP.NET releases four plans called Starter, Economy, Developer and Enterprise at the prices of £3.00/month, £5.50/month, £9.00/month and £17.00/month if you choose annual payment method. Two billing cycles with different prices are available in UKWindowsHostASP.NET’s best UK ASP.NET Core 1.0 hosting package. You can choose between 1-year and 6-months payment methods. UKWindowsHostASP.NET also supports 30-days money back. On the contrary, VidaHost offers Windows Starter and Windows Advanced plans with £2.99/month and £9.99/month.

In below, we create a feature-comparison table of this two best UK ASP.NET hosting companies:

ItemUKWindowsHostASP.NETVidaHost
Plan NameEconomyWindows Starter
Domain50 Domain2 Domains
Bandwidth50 GB50 GB
Disk Space5 GB2 GB
Windows Server Version 2008/2012Version 2008
IIS VersionIIS 7/7.5/8.0IIS 7.0
ASP.NET VersionASP.NET v. 5/4.6/4.5.2/4.5.1/4.0/3.5/2.0ASP.NET 2.0/3.5/4.0/
ASP.NET MVC VersionASP.NET MVC v. 5.1.1/5.15.2/
5.1.2/6.0
ASP.NET MVC v. 4.0
MSSQL VersionMSSQL 2008/2012/2014MSSQL 2008
Email AccountUnlimited20 Account
Complete Features MORE INFO MORE INFO

From the above comparison list, both of them are fully ASP.NET Core 1.0 Hosting compatible. However, UKWindowsHostASP.NET and  VidaHost are different from each other in many features. UKWindowsHostASP.NET can provide richer ASP.NET Core 1.0 hosting features. You can see that UKWindowsHostASP.NET supports all version of ASP.NET, ASP.NET MVC and MSSQL Database including the latest ASP.NET Core 1.0 hosting with affordable price while Vida still limit their ASP.NET, ASP.NET MVC and MSSQL version. Not only that, UKWindowsHostASP.NET can give you more amount of disk space. It is clear that UKWindowsHostASP.NET wins in terms of web hosting features. If we look to their pricing package, we can conclude that ASP.NET Core 1.0 hosting package from UKWindowsHostASP.NET is cheaper than VidaHost.

UKWindowsHostASP.NET VS VidaHost: Performance

Performance decides the user experience to your ASP.NET website. Can visitor open your website page quickly? Is the website reliable and secure? UKWindowsHostASP.NET provides global, on-demand data center and hosting services from facilities across the European Continent. They leverage best-in-class connectivity and technology to innovate industry leading, fully automated solutions that empower enterprises with complete access, control, security, and scalability. They also has great performance when it comes to speed, so you don’t have to worry about your site will going slow. In the other hand, VidaHost runs 2 multihomed autonomous systems spanning 3 datacentres in Maidenhead, Milton Keynes and Slough. Unless specifically requested, all services are provisioned in one of these UK locations, ensuring optimal search engine geo targeting, low latency and high performance.

In terms of website speed above, we have tested their Windows server speed based on the Pingdom speed testing. Results tell us that the server response speed of UKWindowsHostASP.NET is faster than VidaHost.

UKWindowsHostASP.NET VSVidaHost : Technical Support

ServiceIcon-StrategyUKWindowsHostASP.NET is capable of offering professional and timely technical support. They are ready to help the costumers through email ticket and contact form. And all of their support representatives have good attitudes and passions for customer’s various questions and problems. While, VidaHost provides email ticketing, contact form and phone support to make your hosting experience as easy as possible.

Conclusion: UKWindowsHostASP.NET or VidaHost?

At the end, we think that UKWindowsHostASP.NET is much better than VidaHost. The detailed reasons are clearly shown on the above features, pricing, performance and supports comparison. With more advanced features, lower prices, greater performance and also better supports, UKWindowsHostASP.NET is definitely the better choice for UK ASP.NET hosting.

Choosing The Best and Recommended ASP.NET Core 1.0 Hosting in USA

A significant problem with the new versions of ASP.NET is that they aren’t backwards compatible with previous versions. This isn’t just a matter of having slightly different behaviors or APIs, but this is essentially a complete rewrite with a significant amount of functionality being dropped. To eliminate this problem, Microsoft is starting the numbering scheme.  The new versions will be called ASP.NET Core 1.0. ASP.NET Core 1.0 is not a continuation of ASP.NET 4.6. It is a whole new framework, a side-by-side project which is an actual re-write of the current ASP.NET 4.6 framework, but much smaller and a lot more modular. To help ASP.NET developers and users find a good home for their websites, we have reviewed the following top 3 hosting providers who stand out as the best and recommended ASP.NET Core 1.0 hosting for .NET developers.

What’s ASP.NET Core 1.0 Hosting?

Microsoft announced that what has so far been ASP.NET 5 has been renamed to ASP.NET Core 1.0. Microsoft went this route and made it very clear that this version of ASP.NET is a totally new platform to build applications from and not just a small upgrade as prior upgrades from say ASP.NET 3 to 4 have been. ASP.NET Core is a brand new platform that has been rebuilt from the ground up – all the way to the core .NET platform libraries – to provide a leaner and cross platform implementation on what was ASP.NET. While there is a lot of feature compatibility with older versions, it does not have what you would call code compatibility meaning that you can’t just run your old ASP.NET code in ASP.NET Core without a fair bit of change.

With ASP.NET Core 1.0 we are making a number of architectural changes that make the core web framework much leaner and more modular. ASP.NET Core 1.0 is no longer based on System.Web.dll, but is instead based on a set of granular and well factored NuGet packages allowing you to optimize your app to have just what you need. You can reduce the surface area of your application to improve security, reduce your servicing burden and also to improve performance in a true pay-for-what-you-use model.

Which One is The Best & Recommended ASP.NET Core 1.o Hosting in USA?

Our best and recommended ASP.NET 5 hosting in Europe goes to ASPHosPortal.com Windows hosting plan for it’s unlimited features, affordable price, great reliability, friendly tech support and leading server platforms after evaluation over 30+ popular ASP.NET Core 1.0 hosting providers in USA.

Tips To Select Best and Recommended ASP.NET Core 1.0 Hosting

When you’re looking for best and recommended ASP.NET Core 1.0 hosting, you have to ensure that your hosting plan supports and does have one new MSSQL 2008 database, MSSQL 2012 database or MSSQL 2014 database available for the installation. Without the accessibility of the MSSQL database, the free installation will not work and your ASP.NET Core 1.0 cannot be installed. It also requires Windows 2008 hosting with IIS 7.0 hosting compatible or Windows 2012 hosting with IIS 8.0 hosting and above. Here are some highlight tips to select best and recommended ASP.NET Core 1.0 hosting:

Server PlatformHosting FeaturesTechnical Support
ASP.NET Core 1.0 hosting should be configured on the latest Windows Server platform, Server 2008 is minimum requirement for today’s windows hosting service. 2012 should be your final attention since it’s the latest OS.
It must come with most essential functionalities such as multiple ASP.NET frameworks, custom trust level support and SQL Server support etc. It should also come with sufficient disk space and data transfer abilities for different websites requirement.
Technical support is the most essential point when looking for the best and recommended ASP.NET Core 1.0 hosting provider. You can’t tell when you will need assistance from the support team or some basic urgent assistance such as data recovery.

ASP.NET Core 1.0 Hosting with ASPHostPortal.com

asphostportal-icon-e1421832425840-120x120-e1424663413602ASPHostPortal.com is Microsoft No #1 Recommended Windows and ASP.NET Spotlight Hosting Partner in United States. They provide a lot of kind web hosting types such as: Windows hosting, Linux hosting, reseller hosting and many more. As a technology focused web host, their web hosting packages are designed to support popular web development technologies. Windows and ASP.NET 5 hosting are at the core of our business practice. Also, they have over 10 years combined experience in .NET, PHP, Network Administration, System Integration and related technologies to support mission critical hosting for applications built on these platforms. Their service is trusted worldwide and they have served more than 10,000 customers in 5 different continents.

ASPHostPortal.com offers ASP.NET Core 1.0 Hosting with an interested hosting plan. They support this new technology with affordable price, a lot of ASP.NET features, 99.99% uptime guarantee, 24/7 support, and 30 days money back guarantee. They strive to make sure that all customers have the finest web-hosting experience as possible. To learn more about their ASP.NET Core 1.0 Hosting, please visit http://asphostportal.com/ASPNET-Core-1-0-Hosting.

ASP.NET Core 1.0 Hosting Feature & Price

ASPHostPortal.com with innumerable followers is an expert in the hosting market. It provides 3 best and recommended ASP.NET Core 1.0 hosting packages with rich features. Host One charges $5.00/mo. Host Two charges $9.00/mo and Host Three charges $14.00/mo on a regular basis. Moreover, you can enjoy 30-days money back guarantee if you’re not satisfied with their service.

ItemASPHostPortal.com
Price
Features
Uptime
Technical Support

As for more details of these packages, all of them include the latest Plesk Control Panel, huge bandwidth and disk space. Moreover, each plan is integrated with unlimited domains, email accounts and huge databases. Additionally, a free domain name is also included in the meantime.

[supsystic-price-table id=8]

Apart from that, all the packages give you access 24×7 support instant backups and at least 99.9% uptime guarantee. More importantly, there are many tutorials and documentations to help you solve the problems regarding ASP.NET Core 1.0.