<?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>Asp.Net Core &#8211; Sibeesh Passion</title>
	<atom:link href="https://www.sibeeshpassion.com/category/asp-net-core/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Wed, 02 Jun 2021 15:18:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>Asp.Net Core &#8211; Sibeesh Passion</title>
	<link>https://www.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Asp.Net Core Windows Service Task Quartz.Net With Database</title>
		<link>https://www.sibeeshpassion.com/asp-net-core-windows-service-task-quartz-net-with-database/</link>
					<comments>https://www.sibeeshpassion.com/asp-net-core-windows-service-task-quartz-net-with-database/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Thu, 29 Aug 2019 12:46:07 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Asp.Net Core]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Asp Net Core Windows Service]]></category>
		<category><![CDATA[Azure Blob Storage]]></category>
		<category><![CDATA[Azure Storage]]></category>
		<category><![CDATA[NLog]]></category>
		<category><![CDATA[NLog in Windows Service]]></category>
		<category><![CDATA[Quartz Scheduler]]></category>
		<category><![CDATA[Quartz Scheduler with Dependency Injection]]></category>
		<category><![CDATA[Quartz SQL Server]]></category>
		<category><![CDATA[Quartz With Database]]></category>
		<category><![CDATA[Windows Service]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=13893</guid>

					<description><![CDATA[[toc] Introduction In our previous article we have already seen that how we can use Quartz.Net scheduler in our Asp.Net core console application and then run it as a windows service. The problem with that approach is that, the scheduler information will be lost once the system restarts or something bad happens. To rectify that problem we can actually save all the scheduler information in a database, luckily the Quartz.Net scheduler supports this and we can easily implement it. I hope the introduction is clear and let&#8217;s jump on to the implementation. Source Code The source code can be found [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>[toc]</p>



<h2 class="wp-block-heading">Introduction</h2>



<p>In our previous article we have already seen that how we can <a href="https://medium.com/better-programming/asp-net-core-windows-service-task-scheduler-daily-weekly-monthly-700a569d502a"><strong><em>use Quartz.Net scheduler in our Asp.Net core console application and then run it as a windows service</em></strong></a>. The problem with that approach is that, the scheduler information will be lost once the system restarts or something bad happens. To rectify that problem we can actually save all the scheduler information in a database, luckily the Quartz.Net scheduler supports this and we can easily implement it. I hope the introduction is clear and let&#8217;s jump on to the implementation.</p>



<h2 class="wp-block-heading">Source Code</h2>



<p>The source code can be found <a href="https://github.com/SibeeshVenu/Perfect-Scheduler"><strong><em>in this GitHub repository</em></strong></a>. Please feel free to star, fork or do whatever you wish. You can also consider follow me on GitHub. LOL. </p>



<h2 class="wp-block-heading">Setting Up Database</h2>



<p>Before we start the coding, let us set up our database. You can choose any database as you wish. I am choosing SQL Server Express.</p>



<h3 class="wp-block-heading">Install SQL Server Express</h3>



<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="1024" height="812" src="https://sibeeshpassion.com/wp-content/uploads/2019/08/Install-SQl-Express-1024x812.png" alt="" class="wp-image-13894" srcset="/wp-content/uploads/2019/08/Install-SQl-Express-1024x812.png 1024w, /wp-content/uploads/2019/08/Install-SQl-Express-300x238.png 300w, /wp-content/uploads/2019/08/Install-SQl-Express-768x609.png 768w, /wp-content/uploads/2019/08/Install-SQl-Express-425x337.png 425w, /wp-content/uploads/2019/08/Install-SQl-Express.png 1690w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>SQL Server Express</figcaption></figure>



<h3 class="wp-block-heading">Enable sa Login</h3>



<p>We should enable the sa login which we will use in our Quartz configuration. If you try to configure the Quartz with windows authentication, you will get an error as below.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>2019-08-29 11:34:02.3570|INFO|Quartz.Core.QuartzScheduler|JobFactory set to: Backup.Service.Helpers.CustomJobFactory<br> 2019-08-29 11:34:12.6801|INFO|Quartz.Impl.AdoJobStore.JobStoreTX|ConnectionAndTransactionHolder passed to RollbackConnection was null, ignoring<br> 2019-08-29 11:34:12.6892|ERROR|Quartz.Impl.AdoJobStore.JobStoreTX|Failure occurred during job recovery: Failed to obtain DB connection from data source &#8216;default&#8217;: System.Data.SqlClient.SqlException (0x80131904): Cannot open database &#8220;BackupClientSchedules&#8221; requested by the login. The login failed.<br> Login failed for user &#8216;WORKGROUP\DESKTOP-3EF5B65$&#8217;.<br>    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling)<br>    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)<br>    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)<br>    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)<br>    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)<br>    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)<br>    at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource<code>1 retry, DbConnectionOptions userOptions, DbConnectionInternal&amp; connection)    at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource</code>1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp; connection)<br>    at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource<code>1 retry, DbConnectionOptions userOptions)    at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource</code>1 retry)<br>    at System.Data.SqlClient.SqlConnection.Open()<br>    at Quartz.Impl.AdoJobStore.JobStoreSupport.GetConnection() in C:\projects\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 323<br> ClientConnectionId:2efd5ab8-71aa-4598-b5ca-63c5aaa6afbe<br> Error Number:4060,State:1,Class:11</p></blockquote>



<p>Yes, that is such a log error, and we don&#8217;t want any errors right. So let us configure sa login first. I have already explained how you can do that , in one of my StackOverflow answer, you can see that <a href="https://stackoverflow.com/questions/3583605/login-failed-for-user-sa-the-user-is-not-associated-with-a-trusted-sql-server/57707682#57707682"><strong><em>here</em></strong></a>. </p>



<h3 class="wp-block-heading">Create Database and Tables Needed</h3>



<p>Now we need to create a database and some tables where we can save the scheduler and trigger information. You can always see the table schema here in <a href="https://github.com/quartznet/quartznet/blob/master/database/tables/tables_sqlServer.sql"><strong><em>this official Quartz GitHub repository</em></strong></a>. You can also find the same file in our source code.</p>



<p>Before you run that query in your SQL Server Management Studio, make sure to create a database first and the use the same.</p>



<pre class="wp-block-code"><code>CREATE database BackupClientSchedules
USE BackupClientSchedules</code></pre>



<p>Now id you see inside the database BackupClientSchedules, you should see some tables with no data inside.</p>



<figure class="wp-block-image"><img decoding="async" width="646" height="1024" src="https://sibeeshpassion.com/wp-content/uploads/2019/08/Quartz-Net-Tables-646x1024.png" alt="" class="wp-image-13895" srcset="/wp-content/uploads/2019/08/Quartz-Net-Tables-646x1024.png 646w, /wp-content/uploads/2019/08/Quartz-Net-Tables-189x300.png 189w, /wp-content/uploads/2019/08/Quartz-Net-Tables-347x550.png 347w, /wp-content/uploads/2019/08/Quartz-Net-Tables.png 650w" sizes="(max-width: 646px) 100vw, 646px" /><figcaption>Quartz Net Tables</figcaption></figure>



<h2 class="wp-block-heading">Configure Quartz.Net to Use Database Instead of RAM</h2>



<p>As we have already set up our database, now we can start configuring the service. If you are new Quartz.Net scheduler, I strongly recommend you to read my previous <a href="https://sibeeshpassion.com/asp-net-core-windows-service-task-scheduler-daily-weekly-monthly/"><strong><em>article</em></strong></a>. </p>



<h3 class="wp-block-heading">Edit App.config</h3>



<p>Let&#8217;s change the App.config file as preceding.</p>



<script src="https://gist.github.com/SibeeshVenu/dd04457e4c476db1b448c610079ee522.js"></script>



<p>Note that we have set  quartz.dataSource.default.provider  as Sqlserver and also given the  quartz.dataSource.default.connectionString. You should change these values with your provider and connection string.</p>



<h3 class="wp-block-heading">Install the Nuget Package</h3>



<p>We should install the Nuget package Quartz.Serialization.Json in our application. </p>



<h3 class="wp-block-heading">Setup the Scheduler</h3>



<p>In our previous article, we have see how we can setup the scheduler and we were using a function called GetScheduler for the same. Now we can edit the code of that function as preceding.</p>



<script src="https://gist.github.com/SibeeshVenu/c1256a4314d393ef839c2368b4a411b3.js"></script>



<p>Please note the comments in the above code block.</p>



<h2 class="wp-block-heading">Install the Service</h2>



<p>Once we finished the above steps, we can run dotnet publish command with release configuration and install the service as preceding.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="568" src="https://sibeeshpassion.com/wp-content/uploads/2019/08/SC-Commands-1024x568.png" alt="" class="wp-image-13896" srcset="/wp-content/uploads/2019/08/SC-Commands-1024x568.png 1024w, /wp-content/uploads/2019/08/SC-Commands-300x166.png 300w, /wp-content/uploads/2019/08/SC-Commands-768x426.png 768w, /wp-content/uploads/2019/08/SC-Commands-425x236.png 425w, /wp-content/uploads/2019/08/SC-Commands.png 1838w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>SC Commands</figcaption></figure>



<p>Again, read my previous article, if you need a detailed explanations about this step.</p>



<h2 class="wp-block-heading">Output</h2>



<p>Once the service started successfully, you should be able to see two log files backupclientlogfile_backupservice.txt and backupclientlogfile_helperservice.txt in our win7-x64 folder. You can see all the logs in this files.</p>



<p>You should also be able to see some scheduling information in our tables in our database. Some of the table&#8217;s screenshots are given below.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="140" src="https://sibeeshpassion.com/wp-content/uploads/2019/08/Quartz-Job-Details-1024x140.png" alt="" class="wp-image-13897" srcset="/wp-content/uploads/2019/08/Quartz-Job-Details-1024x140.png 1024w, /wp-content/uploads/2019/08/Quartz-Job-Details-300x41.png 300w, /wp-content/uploads/2019/08/Quartz-Job-Details-768x105.png 768w, /wp-content/uploads/2019/08/Quartz-Job-Details-425x58.png 425w, /wp-content/uploads/2019/08/Quartz-Job-Details.png 1923w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Quartz Job Details</figcaption></figure>



<figure class="wp-block-image"><img decoding="async" width="652" height="164" src="https://sibeeshpassion.com/wp-content/uploads/2019/08/Quartz-Sample-Triggers.png" alt="" class="wp-image-13898" srcset="/wp-content/uploads/2019/08/Quartz-Sample-Triggers.png 652w, /wp-content/uploads/2019/08/Quartz-Sample-Triggers-300x75.png 300w, /wp-content/uploads/2019/08/Quartz-Sample-Triggers-425x107.png 425w" sizes="(max-width: 652px) 100vw, 652px" /><figcaption>Quartz Sample Triggers</figcaption></figure>



<figure class="wp-block-image"><img decoding="async" width="649" height="67" src="https://sibeeshpassion.com/wp-content/uploads/2019/08/Quartz-Triggers.png" alt="" class="wp-image-13899" srcset="/wp-content/uploads/2019/08/Quartz-Triggers.png 649w, /wp-content/uploads/2019/08/Quartz-Triggers-300x31.png 300w, /wp-content/uploads/2019/08/Quartz-Triggers-425x44.png 425w" sizes="(max-width: 649px) 100vw, 649px" /><figcaption>Quartz Triggers</figcaption></figure>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Wow!. Now we have learned,</p>



<ul class="wp-block-list"><li>about Windows Service and Asp.Net Console Application</li><li>about How to create a Windows Service using Asp.Net Core</li><li>about How to use Quartz scheduler with database</li></ul>



<h2 class="wp-block-heading">Your turn. What do you think?</h2>



<p>Thanks a lot for reading. Did I miss anything that you may think which is needed in this article? Could you find this post as useful? Kindly do not forget to share me your feedback.</p>



<p>Kindest Regards<br>Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/asp-net-core-windows-service-task-quartz-net-with-database/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Update Net Core 2.0 Application to 2.1 Version</title>
		<link>https://www.sibeeshpassion.com/how-to-update-net-core-2-0-application-to-2-1-version/</link>
					<comments>https://www.sibeeshpassion.com/how-to-update-net-core-2-0-application-to-2-1-version/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sat, 26 May 2018 09:13:30 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Asp.Net Core]]></category>
		<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[.Net Core]]></category>
		<category><![CDATA[Dot Net Core]]></category>
		<category><![CDATA[Dot Net Core 2.0 to 2.1]]></category>
		<category><![CDATA[Dot Net Core 2.0 Vs Dot Net Core 2.1]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=12868</guid>

					<description><![CDATA[[toc] Introduction Many of you might have been developing applications in Net Core 2.0 version, as that was the main release with lots of features. But did you know that the next big release has already happened with some additional features in Net Core journey? Have you already migrated your applications to Dot Net Core 2.1.x version already? If you haven&#8217;t, no worries, here in this post, we are going to cover talk about how we can migrate/update our applications to the new version of Dot Net Core. I hope you will like this article. Background As I said, this [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[toc]</p>
<h2>Introduction</h2>
<p>Many of you might have been developing applications in Net Core 2.0 version, as that was the main release with lots of features. But did you know that the next big release has already happened with some additional features in Net Core journey? Have you already migrated your applications to Dot Net Core 2.1.x version already? If you haven&#8217;t, no worries, here in this post, we are going to cover talk about how we can migrate/update our applications to the new version of Dot Net Core. I hope you will like this article.</p>
<h2>Background</h2>
<p>As I said, this post is only going to cover the steps you may have to take to update your existing Dot Net Core application to 2.1.x. And I will be not be talking about what is Dot net core? And why dot net core is important? etc, if you have those queries in your mind, I strongly recommend you to read the Microsoft document <a href="https://docs.microsoft.com/en-in/dotnet/core/">here</a>.</p>
<p>We will be creating a Dot net Core 2.0 application first, and then we will update the same to 2.1.x version. Sounds good?</p>
<h2>.Net Core 2.0 to 2.1.x</h2>
<h3>Let&#8217;s create a .net core 2.0 application</h3>
<p>As usual open your favorite IDE, Visual Studio 2017, Click on File -&gt; New Project</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Net-Core-2.0.jpg"><img decoding="async" class="alignnone wp-image-12869 size-full" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Net-Core-2.0.jpg" alt="" width="508" height="357" srcset="/wp-content/uploads/2018/05/Net-Core-2.0.jpg 508w, /wp-content/uploads/2018/05/Net-Core-2.0-300x211.jpg 300w, /wp-content/uploads/2018/05/Net-Core-2.0-768x540.jpg 768w, /wp-content/uploads/2018/05/Net-Core-2.0-400x281.jpg 400w, /wp-content/uploads/2018/05/Net-Core-2.0-853x600.jpg 853w" sizes="(max-width: 508px) 100vw, 508px" /></a></p>
<p>As you can see, Asp Net Core version is 2.0.</p>
<p>You can even check the version in your application properties.</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Application-Menu.jpg"><img decoding="async" class="alignnone wp-image-12871" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Application-Menu.jpg" alt="" width="634" height="195" srcset="/wp-content/uploads/2018/05/Application-Menu.jpg 634w, /wp-content/uploads/2018/05/Application-Menu-300x92.jpg 300w, /wp-content/uploads/2018/05/Application-Menu-768x236.jpg 768w, /wp-content/uploads/2018/05/Application-Menu-400x123.jpg 400w" sizes="(max-width: 634px) 100vw, 634px" /></a></p>
<p>Now let&#8217;s run our application and see the output.</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Result-From-NetCore2.0.jpg"><img decoding="async" class="alignnone size-full wp-image-12872" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Result-From-NetCore2.0.jpg" alt="" width="505" height="100" srcset="/wp-content/uploads/2018/05/Result-From-NetCore2.0.jpg 505w, /wp-content/uploads/2018/05/Result-From-NetCore2.0-300x59.jpg 300w, /wp-content/uploads/2018/05/Result-From-NetCore2.0-400x79.jpg 400w" sizes="(max-width: 505px) 100vw, 505px" /></a></p>
<h3>Update Visual Studio 2017 to the latest</h3>
<p>As a first step, to work with Dot net core 2.1 you need to update your IDE. There are a couple of ways you can update your IDE, but the easiest way is to go check the Notifications panel. Let&#8217;s see how to do that.</p>
<p>Go to the View tab and click on Notifications</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Notification-Menu.jpg"><img decoding="async" class="alignnone size-full wp-image-12873" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Notification-Menu.jpg" alt="" width="406" height="433" srcset="/wp-content/uploads/2018/05/Notification-Menu.jpg 335w, /wp-content/uploads/2018/05/Notification-Menu-281x300.jpg 281w, /wp-content/uploads/2018/05/Notification-Menu-400x427.jpg 400w" sizes="(max-width: 406px) 100vw, 406px" /></a></p>
<p>Now you can see all the notifications here as shown in the below image. I always update my Visual Studio whenever there is an update, so you won&#8217;t be able to see that notification here on my panel. If you haven&#8217;t updated, and if you check the Notifications panel, I am sure you will get a link to the update here. You will be able to do further.</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Notification-Panel.jpg"><img decoding="async" class="alignnone size-full wp-image-12874" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Notification-Panel.jpg" alt="" width="373" height="440" srcset="/wp-content/uploads/2018/05/Notification-Panel.jpg 303w, /wp-content/uploads/2018/05/Notification-Panel-254x300.jpg 254w" sizes="(max-width: 373px) 100vw, 373px" /></a></p>
<p>Once you have updated, you can verify your version.</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Visual-Studio-15.7.2-1.jpg"><img decoding="async" class="alignnone wp-image-12876" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Visual-Studio-15.7.2-1.jpg" alt="" width="634" height="381" srcset="/wp-content/uploads/2018/05/Visual-Studio-15.7.2-1.jpg 594w, /wp-content/uploads/2018/05/Visual-Studio-15.7.2-1-300x180.jpg 300w, /wp-content/uploads/2018/05/Visual-Studio-15.7.2-1-768x462.jpg 768w, /wp-content/uploads/2018/05/Visual-Studio-15.7.2-1-400x241.jpg 400w" sizes="(max-width: 634px) 100vw, 634px" /></a></p>
<h3>Install latest Dot Net Core</h3>
<p>Here I am going to download the latest version from <a href="https://www.microsoft.com/net/download/dotnet-core/sdk-2.1.300-preview1">here</a>, however, you can select which version you want from <a href="https://www.microsoft.com/net/download">here</a>.</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Dot-Net-Core-2.1-With-Run-Time.jpg"><img decoding="async" class="alignnone wp-image-12879" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Dot-Net-Core-2.1-With-Run-Time.jpg" alt="" width="634" height="470" srcset="/wp-content/uploads/2018/05/Dot-Net-Core-2.1-With-Run-Time.jpg 482w, /wp-content/uploads/2018/05/Dot-Net-Core-2.1-With-Run-Time-300x222.jpg 300w, /wp-content/uploads/2018/05/Dot-Net-Core-2.1-With-Run-Time-768x569.jpg 768w, /wp-content/uploads/2018/05/Dot-Net-Core-2.1-With-Run-Time-400x296.jpg 400w, /wp-content/uploads/2018/05/Dot-Net-Core-2.1-With-Run-Time-810x600.jpg 810w" sizes="(max-width: 634px) 100vw, 634px" /></a></p>
<p>As you can see that we have installed Dot Net Core SDK, Dot Net Core Runtime, Asp Net Core Runtime, and now you can see that the new version is available for you in Visual Studio 2017.</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Select-Dot-Net-Core-2.1.jpg"><img decoding="async" class="alignnone size-full wp-image-12880" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Select-Dot-Net-Core-2.1.jpg" alt="" width="523" height="290" srcset="/wp-content/uploads/2018/05/Select-Dot-Net-Core-2.1.jpg 523w, /wp-content/uploads/2018/05/Select-Dot-Net-Core-2.1-300x166.jpg 300w, /wp-content/uploads/2018/05/Select-Dot-Net-Core-2.1-400x222.jpg 400w" sizes="(max-width: 523px) 100vw, 523px" /></a></p>
<h3>Changing the Target frameworks</h3>
<p>As the first step, we need to change the Target framework for our application. Here you can select it in the Properties or you can edit the dot(.)csproj file.</p>
<p>Now it is time to change the Microsoft.AspNetCore.All to Microsoft.AspNetCore.App, as with this version Microsoft have reduced the number of dependencies. We always need to install only the needed things right, instead of everything.</p>
<p><a href="https://sibeeshpassion.com/wp-content/uploads/2018/05/Microsoft-NetCore-All-to-NetCore-App.jpg"><img decoding="async" class="alignnone wp-image-12881 size-full" src="https://sibeeshpassion.com/wp-content/uploads/2018/05/Microsoft-NetCore-All-to-NetCore-App-e1527325484490.jpg" alt="" width="634" height="230" /></a></p>
<p>You will always need to change all of your references to the new version. Here I just wanted to show how you can do that. So, look into the packages you have in your application and change it accordingly.</p>
<h2>What is new in Dot(.) Net Core 2.1.x</h2>
<p>The Dot Net Core 2.1.x is a release with some cool new features, I strongly recommend you to read those <a href="https://blogs.msdn.microsoft.com/dotnet/2018/05/07/announcing-net-core-2-1-rc-1/">here.</a></p>
<p>I may write a new post with this features soon.</p>
<h2><span id="conclusion">Conclusion</span></h2>
<p>Thanks a lot for reading. Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<h2><span id="your-turn-what-do-you-think">Your turn. What do you think?</span></h2>
<p>A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/how-to-update-net-core-2-0-application-to-2-1-version/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Installing Asp.Net Core Docker For Windows</title>
		<link>https://www.sibeeshpassion.com/installing-asp-net-core-docker-for-windows/</link>
					<comments>https://www.sibeeshpassion.com/installing-asp-net-core-docker-for-windows/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sun, 07 May 2017 11:01:29 +0000</pubDate>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Asp.Net Core]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Asp.Net Core Docker]]></category>
		<category><![CDATA[Docker In Windows]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=12284</guid>

					<description><![CDATA[[toc] Introduction Here, in this post we are going to a see how we can install Asp.Net Core Docker in our Windows. Before we start, it would be useful if we say something about the Docker right? Docker is a container software platform where container is everything we need to make our software run. The container is light in weight. You can read more about the Docker here. I hope you will like this. Now let&#8217;s begin. Background Today, I was just trying to create a Asp.Net Docker application in Visual Studio 2017. Unfortunately I was getting an error as preceding. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[toc]</p>
<h3>Introduction</h3>
<p>Here, in this post we are going to a see how we can install Asp.Net Core Docker in our <a href="http://sibeeshpassion.com/category/Windows-10/" target="_blank" rel="noopener noreferrer">Windows</a>. Before we start, it would be useful if we say something about the Docker right? Docker is a container software platform where container is everything we need to make our software run. The container is light in weight. You can read more about the Docker <a href="https://www.docker.com/what-docker">here</a>. I hope you will like this. Now let&#8217;s begin.</p>
<h3>Background</h3>
<p>Today, I was just trying to create a Asp.Net Docker application in <a href="http://sibeeshpassion.com/category/Visual-Studio-2017/">Visual Studio 2017</a>. Unfortunately I was getting an error as preceding.</p>
<blockquote><p>Error MSB4018 The &#8220;PrepareForBuild&#8221; task failed unexpectedly.<br />
Microsoft.DotNet.Docker.CommandLineClientException: Unable to run &#8216;docker-compose&#8217;. Verify that Docker for Windows is installed and running locally. For troubleshooting, please review http://aka.ms/DockerToolsTroubleshooting. &#8212;&gt; System.ComponentModel.Win32Exception: The system cannot find the file specified</p></blockquote>
<p>Then I came to know that I have not installed Docker in my machine yet, so I decided to do that.</p>
<p><div id="attachment_12307" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Asp-Net-Core-Docker-Error.png"><img decoding="async" aria-describedby="caption-attachment-12307" class="wp-image-12307" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Asp-Net-Core-Docker-Error-1024x581.png" alt="Asp Net Core Docker Error" width="634" height="360" srcset="/wp-content/uploads/2017/05/Asp-Net-Core-Docker-Error-1024x581.png 1024w, /wp-content/uploads/2017/05/Asp-Net-Core-Docker-Error-300x170.png 300w, /wp-content/uploads/2017/05/Asp-Net-Core-Docker-Error-768x436.png 768w, /wp-content/uploads/2017/05/Asp-Net-Core-Docker-Error-400x227.png 400w, /wp-content/uploads/2017/05/Asp-Net-Core-Docker-Error-1057x600.png 1057w, /wp-content/uploads/2017/05/Asp-Net-Core-Docker-Error.png 1379w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-12307" class="wp-caption-text">Asp Net Core Docker Error</p></div></p>
<h3>Installing Docker For Windows</h3>
<p>You can install the Docker from <a href="https://docs.docker.com/docker-for-windows/install/#download-docker-for-windows">here</a>. Once you downloaded the set up file, please run the file.</p>
<p><div id="attachment_12308" style="width: 628px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-For-Windows.png"><img decoding="async" aria-describedby="caption-attachment-12308" class="size-full wp-image-12308" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-For-Windows.png" alt="Docker For Windows" width="618" height="483" srcset="/wp-content/uploads/2017/05/Docker-For-Windows.png 618w, /wp-content/uploads/2017/05/Docker-For-Windows-300x234.png 300w, /wp-content/uploads/2017/05/Docker-For-Windows-400x313.png 400w" sizes="(max-width: 618px) 100vw, 618px" /></a><p id="caption-attachment-12308" class="wp-caption-text">Docker For Windows</p></div></p>
<h3>Start and test the Docker</h3>
<p>Once you installed the Docker, now it is time to test whether everything is installed correctly or not. Before that make sure that the Docker is starting.</p>
<p><div id="attachment_12309" style="width: 281px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-is-Starting.png"><img decoding="async" aria-describedby="caption-attachment-12309" class="size-full wp-image-12309" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-is-Starting.png" alt="Docker is Starting" width="271" height="152" /></a><p id="caption-attachment-12309" class="wp-caption-text">Docker is Starting</p></div></p>
<p>There is a hight possibility that to get an error &#8220;Hardware assisted virtulization and data execution protection must be enabled in the BIOS&#8221; as preceding image.</p>
<p><div id="attachment_12310" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-Error.png"><img decoding="async" aria-describedby="caption-attachment-12310" class="wp-image-12310" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-Error.png" alt="Docker Error" width="634" height="233" srcset="/wp-content/uploads/2017/05/Docker-Error.png 863w, /wp-content/uploads/2017/05/Docker-Error-300x110.png 300w, /wp-content/uploads/2017/05/Docker-Error-768x282.png 768w, /wp-content/uploads/2017/05/Docker-Error-400x147.png 400w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-12310" class="wp-caption-text">Docker Error</p></div></p>
<p>Before you go and change the settings in BIOS, check in Task Manager window as well.</p>
<p><div id="attachment_12311" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Hyper-V-support-and-Virtulization.png"><img decoding="async" aria-describedby="caption-attachment-12311" class="wp-image-12311" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Hyper-V-support-and-Virtulization.png" alt="Hyper V support and Virtulization" width="634" height="564" srcset="/wp-content/uploads/2017/05/Hyper-V-support-and-Virtulization.png 834w, /wp-content/uploads/2017/05/Hyper-V-support-and-Virtulization-300x267.png 300w, /wp-content/uploads/2017/05/Hyper-V-support-and-Virtulization-768x683.png 768w, /wp-content/uploads/2017/05/Hyper-V-support-and-Virtulization-400x356.png 400w, /wp-content/uploads/2017/05/Hyper-V-support-and-Virtulization-674x600.png 674w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-12311" class="wp-caption-text">Hyper V support and Virtulization</p></div></p>
<h3>Enabling Virtulization in BIOS</h3>
<p>To Enable the Virtulization in BIOS, go to System Configuration -&gt; Click on Virtulization Technology and Enable it.</p>
<p><div id="attachment_12313" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/BIOS-Settings.jpeg"><img decoding="async" aria-describedby="caption-attachment-12313" class="wp-image-12313" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/BIOS-Settings-1024x574.jpeg" alt="BIOS Settings" width="634" height="355" srcset="/wp-content/uploads/2017/05/BIOS-Settings-1024x574.jpeg 1024w, /wp-content/uploads/2017/05/BIOS-Settings-300x168.jpeg 300w, /wp-content/uploads/2017/05/BIOS-Settings-768x430.jpeg 768w, /wp-content/uploads/2017/05/BIOS-Settings-400x224.jpeg 400w, /wp-content/uploads/2017/05/BIOS-Settings-1071x600.jpeg 1071w, /wp-content/uploads/2017/05/BIOS-Settings.jpeg 634w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-12313" class="wp-caption-text">BIOS Settings</p></div></p>
<p>After the restart, the Docker will ask you to start the service. Go ahead and do that.</p>
<h3>Setting up Docker</h3>
<p><div id="attachment_12314" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-Service-Is-Not-Runnig-Window.png"><img decoding="async" aria-describedby="caption-attachment-12314" class="wp-image-12314" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-Service-Is-Not-Runnig-Window.png" alt="Docker Service Is Not Runnig Window" width="634" height="233" srcset="/wp-content/uploads/2017/05/Docker-Service-Is-Not-Runnig-Window.png 863w, /wp-content/uploads/2017/05/Docker-Service-Is-Not-Runnig-Window-300x110.png 300w, /wp-content/uploads/2017/05/Docker-Service-Is-Not-Runnig-Window-768x282.png 768w, /wp-content/uploads/2017/05/Docker-Service-Is-Not-Runnig-Window-400x147.png 400w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-12314" class="wp-caption-text">Docker Service Is Not Runnig Window</p></div></p>
<p>Now again, if you are getting an error as &#8220;Error MSB4018 The &#8220;PrepareForLaunch&#8221; task failed unexpectedly.<br />
Microsoft.DotNet.Docker.CommandLineClientException: Creating network &#8220;dockercompose3875147227_default&#8221; with the default driver<br />
Building linq_basic_to_advanced Service  &#8216;linq_basic_to_advanced&#8217; failed to build: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).&#8221;, you need to change your shared drive settings in Docker.</p>
<p>Right click and click on the settings.</p>
<p><div id="attachment_12315" style="width: 397px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-Settings.png"><img decoding="async" aria-describedby="caption-attachment-12315" class="size-full wp-image-12315" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-Settings.png" alt="Docker Settings" width="387" height="291" srcset="/wp-content/uploads/2017/05/Docker-Settings.png 387w, /wp-content/uploads/2017/05/Docker-Settings-300x226.png 300w" sizes="(max-width: 387px) 100vw, 387px" /></a><p id="caption-attachment-12315" class="wp-caption-text">Docker Settings</p></div></p>
<p>Click on the Shared Drives and  select the drive that hosts your project and the drive where %USERPROFILE% resides.</p>
<p><div id="attachment_12316" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Shared-Drive-in-Docker.png"><img decoding="async" aria-describedby="caption-attachment-12316" class="wp-image-12316" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Shared-Drive-in-Docker-1024x666.png" alt="Shared Drive in Docker" width="634" height="413" srcset="/wp-content/uploads/2017/05/Shared-Drive-in-Docker-1024x666.png 1024w, /wp-content/uploads/2017/05/Shared-Drive-in-Docker-300x195.png 300w, /wp-content/uploads/2017/05/Shared-Drive-in-Docker-768x500.png 768w, /wp-content/uploads/2017/05/Shared-Drive-in-Docker-400x260.png 400w, /wp-content/uploads/2017/05/Shared-Drive-in-Docker-922x600.png 922w, /wp-content/uploads/2017/05/Shared-Drive-in-Docker.png 549w" sizes="(max-width: 634px) 100vw, 634px" /></a><p id="caption-attachment-12316" class="wp-caption-text">Shared Drive in Docker</p></div></p>
<p>Click on Apply and type your filesystem passwor in the following pop up. Now if you are running the Edge version of Docker Community Edition for Windows, after the install you may be able to login with your Docker ID and password.</p>
<p><div id="attachment_12320" style="width: 619px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-SignIn-page.png"><img decoding="async" aria-describedby="caption-attachment-12320" class="size-full wp-image-12320" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-SignIn-page.png" alt="Docker SignIn page" width="609" height="367" srcset="/wp-content/uploads/2017/05/Docker-SignIn-page.png 609w, /wp-content/uploads/2017/05/Docker-SignIn-page-300x181.png 300w, /wp-content/uploads/2017/05/Docker-SignIn-page-400x241.png 400w" sizes="(max-width: 609px) 100vw, 609px" /></a><p id="caption-attachment-12320" class="wp-caption-text">Docker SignIn page</p></div></p>
<p>We have enough settings for now, shall we just check whether the installation is done perfectly or not? To check, go to the command window and type the command as  docker run hello-world.</p>
<p><div id="attachment_12322" style="width: 593px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-Check-From-Command-Window.png"><img decoding="async" aria-describedby="caption-attachment-12322" class="size-full wp-image-12322" src="http://sibeeshpassion.com/wp-content/uploads/2017/05/Docker-Check-From-Command-Window.png" alt="Docker Check From Command Window" width="583" height="414" srcset="/wp-content/uploads/2017/05/Docker-Check-From-Command-Window.png 583w, /wp-content/uploads/2017/05/Docker-Check-From-Command-Window-300x213.png 300w, /wp-content/uploads/2017/05/Docker-Check-From-Command-Window-400x284.png 400w" sizes="(max-width: 583px) 100vw, 583px" /></a><p id="caption-attachment-12322" class="wp-caption-text">Docker Check From Command Window</p></div></p>
<p>You can also check the Docker version with the command docker &#8211;version</p>
<h3>Conclusion</h3>
<p>Did I miss anything that you may think which is needed? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<h3>Your turn. What do you think?</h3>
<p>A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/installing-asp-net-core-docker-for-windows/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
