(#9) launchsettings.json in Asp.Net Core | Asp.Net Core tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone welcome again to asp.net core in missa tutorial since we are developing an asp.net core m ec application during the development time there are several things that you must know when you run your project from the development machine by pressing a file from your visual to you or could bolt a file code if you are using your net command that is dotnet run then how the default port gets etched to the application how the browser gets open so we will understand about all these things in this video basically in this video you will understand about low in settings toward dsm-5 let's have a look what we are going to learn in this video in this video we will understand what is loan settings don't guess and file where is this file located what our properties is available inside this file how to set that default port for the application when you run your application by using any medium on your development machine then a default port is assigned to your application where is that port located can I change it or not so we will understand all these things in this video to understand about the loan settings let's open the visual studio in this visual studio I am using the same application that we have created for the bookstore application and if you will open the solution Explorer of this code then you will see there is a folder properties if you expand this folder then you will see there is a file launch settings torjussen if you are having any kind of confusion that why this folder is not looking like a proper folder so this is because this is a default folder which is used inside the Rope net core and this folder has some specific meaning to this application that is why there is the symbol inside of this folder but if you will open this code into your folder and Explorer just like this then you can see we have the actual properties folder and inside this properties folder we have the loan settings and decent file okay now let's click on these loan setting store DSN file here inside this file you will see we have two sections first one is is settings and that signal is profiles first profile is eye yes Express and the second one is the name of the project which is gentle note bookstore so here you can see web gentle don't bookstore when you run this application on your local development machine then ultimately you are using any one of these profile either you are using this IIST Express profile or you are using this web gentle load bookstore profile okay let's have a look on what details are available inside these profiles command name is expressed so when you run your application ultimately behind the core one command is required and to run on the is Express we need is Express command then launch browser when you run your application and you want your browser to be open automatically then you have to set it to over here environment variable in case you want to set the environment variable for your development machine then you can define it code here by default it is development that is why it is written over here development okay and some of the details of this is Express is written inside this is setting since highest expressed with just a small form of by a server that is why few settings are will work over here the application URL it means when you even run your code by using this highest profile then this will be the default figure of your application here is the pork of your application six well thing for you if you want to update the default port for this application then you can make some changes here in this line okay and if you are using your application on HTTP then you can define your port over here now let's go back to the another profile which is well gentle dot bookstore here the command name is project don't browser is to Nickerson you are is this so just have a look there is a difference in between the port when you will run your application using is Express then the default port will be this one and if you will run your application without using highest express that is by using gesture so if you are not using is Express Ultimat Lee we will be using gesture so if you are running your application by using Kestrel server then these settings are available so in that scenario the port be 5,000 now Lexi's on settings in the visual studio and if I click on this job down then you can see we have highest expressed and then we have the second profile also over here WebCenter Brookstone so you can choose any one of the profile by using this drop down if you are using is expressed then your application will be running on the port which is 6 5 3 5 2 if you in use your profile this one the gentle store then the highest express will not work only the application will be working on guest well server so by default first let's understand about the highest Express now let's press ctrl f5 here you have to notice the port of this application which is 6 5 3 5 2 and this port is coming from this place 6 5 3 5 2 let's close it and let's just update it so now I'm writing 612 3 5 3 and if I press ctrl f5 again and this time you can see the pole 2 per application is 6 5 3 5 3 we are we still running the same application let's close this again and now instead of using this is Express profile if I want to run my application by using kestrel server so I can update the settings in this drop down I can choose now the gentle load book store which is the second profile let's choose this one ok it is selected now and now let's press control the five this time you can see we got this control window here you can see the port is XT to be localhost 5000 since this time we are running the application by using the kestrel server so first we go to this window and then we go to the browser and in the browser also you can see the port is 5000 and we got the same message and now suppose instead of using 5000 I want to run my application on five thousand one and this time to run this application I will be using donate CLI let's open this quote into the file explorer and now let's open the command prompt over here and to run the application using donate CLI we simply have to type donate and run and press enter this time we are running that quick using SQL Server note the is expressed this time you can notice the port of the application is five thousand one one thing you have noticed that when we lumber application then the browser gets open automatically and these settings are coming from this place launch browser true if I make it to the false and let's change it back to the highest Express save the changes and press the file or click on this button this one you can see that that application is running but there is no default browser if I open this URL in any work of the browser then you will see the rendering of this particular application in that browser but by default no browser will get opened because we have made these settings to false remember guys this loan settings donation file is not required from the production server this is just for the development machine so whatever you will write inside this file that will be available only for the development machine for other configurations which are required into the application we use some other file which is up settings that we will learn in the upcoming videos but for now just understand that this loan settings file is used for the development machine that is all in this video thank you for watching have a great day
Info
Channel: WebGentle
Views: 31,869
Rating: undefined out of 5
Keywords: launchsettings.json .Net Core, launchsettings.json .net core 2.2, launchsettings.json .net core 3, launchsettings.json .net core 3.1, launchsettings.json in .net core, launchsettings.json, launchsettings .net core, use of launchsettings, Asp.Net Core tutorial, set default url of asp.net core, change to kestrol asp net core, asp.net core mvc tutorial, asp.net core 3.0, asp.net core 3.0 tutorial, asp.net core mvc 3.1, Asp.net core mvc 3.1 tutorial
Id: 5A68_ArtOJA
Channel Id: undefined
Length: 7min 59sec (479 seconds)
Published: Tue Mar 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.