<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>development asp.net core &#8211; ASP.NET Hosting Reviews and Guides</title>
	<atom:link href="https://topreviewhostingasp.net/tag/development-asp-net-core/feed/" rel="self" type="application/rss+xml" />
	<link>https://topreviewhostingasp.net</link>
	<description>ASP.NET Hosting &#124; Reviews &#124; Tips &#38; Tutorial</description>
	<lastBuildDate>Wed, 09 Jan 2019 04:24:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://topreviewhostingasp.net/wp-content/uploads/2017/01/cropped-trhaico-32x32.png</url>
	<title>development asp.net core &#8211; ASP.NET Hosting Reviews and Guides</title>
	<link>https://topreviewhostingasp.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Top 13 ASP.NET Core Features that You MUST Try</title>
		<link>https://topreviewhostingasp.net/13-asp-net-core-features/</link>
					<comments>https://topreviewhostingasp.net/13-asp-net-core-features/#respond</comments>
		
		<dc:creator><![CDATA[Jacques Hunt]]></dc:creator>
		<pubDate>Wed, 09 Jan 2019 04:11:33 +0000</pubDate>
				<category><![CDATA[Hosting Tips]]></category>
		<category><![CDATA[asp.net core]]></category>
		<category><![CDATA[asp.net core tips]]></category>
		<category><![CDATA[asp.net core tutorial]]></category>
		<category><![CDATA[ASP.NET Hosting]]></category>
		<category><![CDATA[cheap ASP.NET Hosting]]></category>
		<category><![CDATA[development asp.net core]]></category>
		<category><![CDATA[reason to use asp.net]]></category>
		<guid isPermaLink="false">https://topreviewhostingasp.net/?p=2641</guid>

					<description><![CDATA[ASP.NET is one of the most successful web application development frameworks by Microsoft. With every update, new and extended features are added that help developers deploy highly scalable and high-performance web applications. When coupled with application monitoring and other performance tools, such as a profiler, ASP.NET becomes a powerful solution for building incredible apps. Within the framework itself, there [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>ASP.NET is one of the most successful web application development frameworks by Microsoft. With every update, new and extended features are added that help developers deploy highly scalable and high-performance web applications.</p>
<p>When coupled with application monitoring and other performance tools, such as a profiler, ASP.NET becomes a powerful solution for building incredible apps.</p>
<p>Within the framework itself, there are myriad features to help you overcome common development challenges, do more with your apps, and boost performance.</p>
<p style="text-align: center;"><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-2642" src="https://topreviewhostingasp.net/wp-content/uploads/2019/01/asp-net-core.png" alt="" width="288" height="175" srcset="https://topreviewhostingasp.net/wp-content/uploads/2019/01/asp-net-core.png 288w, https://topreviewhostingasp.net/wp-content/uploads/2019/01/asp-net-core-50x30.png 50w" sizes="(max-width: 288px) 100vw, 288px" /></p>
<h2>13 features to build better applications with ASP.NET Core</h2>
<h3>1. Cross-platform &amp; container support</h3>
<p>With the introduction of .NET Core, you can now create ASP.NET applications and deploy them to <strong>Windows, Linux, and macOS</strong>. Microsoft and the community have put a huge effort into making Linux a first-class citizen for running ASP.NET.</p>
<p>Containers are eating the clouds these days. Docker, Kuberenetes and other technologies are all the rage. ASP.NET Core allows developers to utilize all of these new technologies. Microsoft Azure even has support for deploying your application to containers and Kubernetes.</p>
<h3>2. High performance</h3>
<p>Some say that performance is a critical feature of your software. I tend to agree! With the introduction of ASP.NET Core and the Kestrel web server, ASP.NET is touted as one of the fastest web application frameworks available. <a href="https://www.techempower.com/benchmarks/" target="_blank" rel="noopener noreferrer">TechEmpower</a> has some cool benchmarks you can check out.</p>
<p>The technology that powered the ASP.NET integrated pipeline and IIS was roughly 15 years old. It did everything and carried a lot of baggage with it. The new Kestrel web server was redesigned from the ground up to take advantage of asynchronous programming models, be much more lightweight, and fast!</p>
<p style="text-align: center;"><img decoding="async" class="aligncenter size-full wp-image-2643" src="https://topreviewhostingasp.net/wp-content/uploads/2019/01/kestrel.png" alt="" width="1501" height="875" srcset="https://topreviewhostingasp.net/wp-content/uploads/2019/01/kestrel.png 1501w, https://topreviewhostingasp.net/wp-content/uploads/2019/01/kestrel-300x175.png 300w, https://topreviewhostingasp.net/wp-content/uploads/2019/01/kestrel-768x448.png 768w, https://topreviewhostingasp.net/wp-content/uploads/2019/01/kestrel-1024x597.png 1024w, https://topreviewhostingasp.net/wp-content/uploads/2019/01/kestrel-50x29.png 50w" sizes="(max-width: 1501px) 100vw, 1501px" /></p>
<h3>3. Asynchronous via async/await</h3>
<p>ASP.NET has excellent support for utilizing asynchronous programming patterns. Async is now implemented in all common .NET Framework classes and most third-party libraries. Most modern applications spend most of their time and CPU cycles waiting for database queries, web service calls, and other I/O operations to complete.</p>
<p>One of the reasons ASP.NET Core is faster is its extensive use of asynchronous patterns within the new MVC and Kestrel frameworks.</p>
<pre class="prettyprint prettyprinted"><span class="com">//mark the method as async</span>
<span class="kwd">public</span> <span class="kwd">async</span> <span class="typ">Task</span> <span class="typ">GetGWB</span><span class="pun">()</span>
<span class="pun">{</span>
    <span class="typ">HttpClient</span><span class="pln"> hc </span><span class="pun">=</span> <span class="kwd">new</span> <span class="typ">HttpClient</span><span class="pun">();</span>
    <span class="com">//await keyword handles all the complexity of async threading and callbacks</span>
    <span class="kwd">await</span><span class="pln"> hc</span><span class="pun">.</span><span class="typ">GetAsync</span><span class="pun">(</span><span class="str">"http://geekswithblogs.net/Default.aspx"</span><span class="pun">);</span>
    <span class="kwd">return</span> <span class="kwd">true</span><span class="pun">;</span>
<span class="pun">}</span></pre>
<h3><a href="http://www.asphostportal.com"><img decoding="async" class="size-full wp-image-2584 alignleft" src="https://topreviewhostingasp.net/wp-content/uploads/2018/11/ahp-banner-aspnet-01.png" alt="" width="300" height="271" srcset="https://topreviewhostingasp.net/wp-content/uploads/2018/11/ahp-banner-aspnet-01.png 300w, https://topreviewhostingasp.net/wp-content/uploads/2018/11/ahp-banner-aspnet-01-50x45.png 50w" sizes="(max-width: 300px) 100vw, 300px" /></a>4. Unified MVC &amp; Web API frameworks</h3>
<p>Before ASP.NET Core, developers were most commonly using the MVC and Web API frameworks. MVC was tailored to creating web applications that served up HTML. Web API was designed to create RESTful services using JSON or XML.</p>
<p>With ASP.NET Core, MVC and Web API have been merged together. There was always a lot of overlap with the two frameworks. MVC could always return JSON data instead of HTML. Combining them was a good move and simplifies development.</p>
<p>With ASP.NET Core we also have the new Razor Pages. They extend the MVC framework to allow encapsulating the controller and model aspects of a page together with two-way binding. They are sort of a replacement for WebForms while using the familiar Razor syntax.</p>
<h3>5. Multiple environments and development mode</h3>
<p>One of my favorite features is the new environment feature. It allows you to easily differentiate parts of your code for their behavior in development, staging, production, etc. There was no standard way to do this before ASP.NET Core.</p>
<p>Environments are perfect for using different CSS or Javascript files. Use your CDN in production, but local files during development. This is a snippet out of my Razor layout view.</p>
<pre class="prettyprint prettyprinted">    <span class="tag">&lt;environment</span> <span class="atn">names</span><span class="pun">=</span><span class="atv">"Development"</span><span class="tag">&gt;</span>
        <span class="tag">&lt;script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"~/lib/jquery/dist/jquery.js"</span><span class="tag">&gt;&lt;/script&gt;</span>
        <span class="tag">&lt;script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"~/lib/bootstrap/dist/js/bootstrap.js"</span><span class="tag">&gt;&lt;/script&gt;</span>
        <span class="tag">&lt;script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"~/js/site.js"</span> <span class="atn">asp-append-version</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;&lt;/script&gt;</span>
    <span class="tag">&lt;/environment&gt;</span>
    <span class="tag">&lt;environment</span> <span class="atn">names</span><span class="pun">=</span><span class="atv">"Staging,Production"</span><span class="tag">&gt;</span>
        <span class="tag">&lt;script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"</span>
                <span class="atn">asp-fallback-src</span><span class="pun">=</span><span class="atv">"~/lib/jquery/dist/jquery.min.js"</span>
                <span class="atn">asp-fallback-test</span><span class="pun">=</span><span class="atv">"window.jQuery"</span>
                <span class="atn">crossorigin</span><span class="pun">=</span><span class="atv">"anonymous"</span>
                <span class="atn">integrity</span><span class="pun">=</span><span class="atv">"sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk"</span><span class="tag">&gt;</span>
        <span class="tag">&lt;/script&gt;</span>
        <span class="tag">&lt;script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"</span>
                <span class="atn">asp-fallback-src</span><span class="pun">=</span><span class="atv">"~/lib/bootstrap/dist/js/bootstrap.min.js"</span>
                <span class="atn">asp-fallback-test</span><span class="pun">=</span><span class="atv">"window.jQuery &amp;&amp; window.jQuery.fn &amp;&amp; window.jQuery.fn.modal"</span>
                <span class="atn">crossorigin</span><span class="pun">=</span><span class="atv">"anonymous"</span>
                <span class="atn">integrity</span><span class="pun">=</span><span class="atv">"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"</span><span class="tag">&gt;</span>
        <span class="tag">&lt;/script&gt;</span>
        <span class="tag">&lt;script</span> <span class="atn">src</span><span class="pun">=</span><span class="atv">"~/js/site.min.js"</span> <span class="atn">asp-append-version</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;&lt;/script&gt;</span>
    <span class="tag">&lt;/environment&gt;</span></pre>
<h3>6. Dependency Injection</h3>
<p>One of the great new features of ASP.NET Core is built in dependency injection. It is heavily used within ASP.NET MVC itself. It is the preferred way that things like logging contexts, database contexts, and other things are passed into your MVC controllers.</p>
<pre class="prettyprint prettyprinted"><span class="kwd">public</span> <span class="kwd">class</span> <span class="typ">PaymentService</span><span class="pun">:</span> <span class="typ">IPaymentService</span>
<span class="pun">{</span>
  <span class="kwd">public</span> <span class="typ">ILogger</span> <span class="typ">Logger</span> <span class="pun">{</span> <span class="kwd">get</span><span class="pun">;</span> <span class="pun">}</span>

  <span class="com">//automatically passes the logger factory in to the constructor via dependency injection</span>
  <span class="kwd">public</span> <span class="typ">PaymentService</span><span class="pun">(</span><span class="typ">ILoggerFactory</span><span class="pln"> loggerFactory</span><span class="pun">)</span>
  <span class="pun">{</span>
    <span class="typ">Logger</span> <span class="pun">=</span><span class="pln"> loggerFactory</span><span class="pun">?.</span><span class="typ">CreateLogger</span><span class="pun">();</span>
    <span class="kwd">if</span><span class="pun">(</span><span class="typ">Logger</span> <span class="pun">==</span> <span class="kwd">null</span><span class="pun">)</span>
    <span class="pun">{</span>
      <span class="kwd">throw</span> <span class="kwd">new</span> <span class="typ">ArgumentNullException</span><span class="pun">(</span><span class="pln">nameof</span><span class="pun">(</span><span class="pln">loggerFactory</span><span class="pun">));</span>
    <span class="pun">}</span>
    <span class="typ">Logger</span><span class="pun">.</span><span class="typ">LogInformation</span><span class="pun">(</span><span class="str">"PaymentService created"</span><span class="pun">);</span>
  <span class="pun">}</span>
<span class="pun">}</span></pre>
<h3>7. WebSockets &amp; SignalR</h3>
<p>ASP.NET has first class support for <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/websockets" target="_blank" rel="noopener noreferrer">WebSockets</a>. This can be used to persist long running connections and communicate back and forth with the browser. SignalR is a full framework that is also available that makes it easy handle common scenarios.</p>
<h3>8. Cross-Site Request Forgery (CSRF) Protection</h3>
<p>Security is important. It is also one of those things that can be a lot of work to prevent certain types of attacks. CSRF is in referencing to hijacking users authenticated session to perform an action that they did not initiate.</p>
<p>For example, let’s pretend that you log in to your bank account and then navigate to a different website. If that other website could do a POST to your bank website to transfer funds, that would be a bad thing. It could potentially do that if your online session on the banking website is valid and the bank does not properly validate requests.</p>
<p>ASP.NET has a good framework that is available to prevent these types of attacks. It generates anti-forgery tokens.</p>
<h3>9. “Self hosted” Web Applications</h3>
<p>Sometimes you need to make a web application that will be deployed on to a desktop and not a server running IIS. Our free ASP.NET profiler, Prefix, is a perfect example of this. Its front end is all HTML that is loaded from an ASP.NET application running as a Windows Service.</p>
<p>You can create a self-hosted ASP.NET web application several different ways. In .NET 4.5 you could accomplish it by using Owin, Nancy, or WCF. For Prefix, we use ASP.NET Web API with Owin.</p>
<p>With ASP.NET Core, you can also use the standard Kestrel web server. One of the great advantages of .NET Core is that your web application is essentially a console application. IIS just sits in front of it as a reverse proxy. This means that you can also deploy your app only with kestrel for non-server based use cases, like Prefix.</p>
<h3>10. Action Filters</h3>
<p>One of the great features of ASP.NET is the support for extensible filters. This allows you to implement functionality that can be applied to an entire controller or action without modifying the action itself.</p>
<p>Filters are used to specify caching, error handling, authorization, or any custom logic you would like to implement.</p>
<pre class="prettyprint prettyprinted"><span class="kwd">using</span> <span class="typ">System</span><span class="pun">;</span>
<span class="kwd">using</span> <span class="typ">System</span><span class="pun">.</span><span class="typ">Web</span><span class="pun">.</span><span class="typ">Mvc</span><span class="pun">;</span>

<span class="kwd">namespace</span> <span class="typ">MvcApplication1</span><span class="pun">.</span><span class="typ">Controllers</span>
<span class="pun">{</span><span class="pln">
     </span><span class="kwd">public</span> <span class="kwd">class</span> <span class="typ">DataController</span> <span class="pun">:</span> <span class="typ">Controller</span><span class="pln">
     </span><span class="pun">{</span><span class="pln">
          </span><span class="pun">[</span><span class="typ">OutputCache</span><span class="pun">(</span><span class="typ">Duration</span><span class="pun">=</span><span class="lit">10</span><span class="pun">)]</span><span class="pln">
          </span><span class="kwd">public</span> <span class="kwd">string</span> <span class="typ">Index</span><span class="pun">()</span><span class="pln">
          </span><span class="pun">{</span><span class="pln">
               </span><span class="kwd">return</span> <span class="typ">DateTime</span><span class="pun">.</span><span class="typ">Now</span><span class="pun">.</span><span class="typ">ToString</span><span class="pun">(</span><span class="str">"T"</span><span class="pun">);</span><span class="pln">
          </span><span class="pun">}</span><span class="pln">
     </span><span class="pun">}</span>
<span class="pun">}</span></pre>
<h3>11. Extensible Output Caching</h3>
<p>This feature allows ASP.NET to cache the output generated by a page and serve this cached content for future requests. It stores the data that is not updated frequently and outputs that specific data from a cached location.</p>
<p>ASP.NET makes it easy to specify how long any request should be cached via common HTTP headers. It also has support for caching output within the memory on your web server itself. You can even use <a href="https://docs.microsoft.com/en-us/azure/redis-cache/cache-aspnet-output-cache-provider" target="_blank" rel="noopener noreferrer">Redis</a> or other providers to handle your output caching.</p>
<h3>12. Globalization and Localization</h3>
<p>ASP.NET makes it easy to localize dates, numbers, and the text within your web application. If you want your application to be used across the globe, localization will be very important to you.</p>
<p>ASP.NET enables customizing your application for multiple languages via resource files. These resource files are considered as the central repository where all texts are kept, and web pages can read this resource file and get labels populated. There are two types of resources:</p>
<ul>
<li>Local Resources – specific for a page (i.e., there will be local resource file for every page)</li>
<li>Global Resources – common for the whole website (i.e., one resource file accessed by all pages)</li>
</ul>
<h3>13. Swagger OpenAPI</h3>
<p>If you are creating API applications, you want to make sure you are using <a href="https://swagger.io/" target="_blank" rel="noopener noreferrer">Swagger</a>. It makes it easy to document and test your APIs.</p>
<p>ASP.NET has historically provided built-in functionality that is pretty similar for SOAP web services created with WCF. If you are using Web API or MVC for RESTful APIs, you definitely want to use Swagger.</p>
<h2>Conclusion</h2>
<p>ASP.NET Core has been a nice upgrade over previous versions. In this article, we highlighted some of the key features you should be aware of. Some are new, some are just key features of ASP.NET that have existed for a while.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://topreviewhostingasp.net/13-asp-net-core-features/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
