Hosting .NET Core 6.0 Web API in IIS Server using VS Code | .NET Core 6.0 deployment from VS Code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys good morning welcome to nigeria techies this is our asp.net core tutorial so part of this video we can talk about how to deploy the bb in ia server and here i listed out all the steps we can go one by one the first step is we have to create one brand new site and also we need to set up the file path so let me open the ia server so already i'm having the ies it's opening in case if you don't have this ies you have to enable it for enabling this one just to go to the control panel so here you have to select this program and features so after that you just go to the chan windows feature on and off so inside that we have the option is internet information services you have to select all the options and also this dartmouth framework 4.8 advanced services here i'll show you how to choose all the options finally how to click this ok it will install this is in our machine so i already have the setup so let me go to the ies so as i mentioned i am going to create my first brand new site the website name is sales apa so after that see the binding side i am selecting this is https and the port is 8082 so then this ip address if required you can give otherwise you have to keep like this it will run in the local ghost then the cssl certificate you have to select this ias express development certificate and the localhost this is fine for the view you have to see the certification information add this physical path so let me create it so in the c folder internet file then this wwe root here the hosting so inside the host i am going to create one more new folder so the name is sales cpa okay we have done and one more important thing is just to go to the apples in the app pool so basically this dartmouth clr version is 4.0 only you just right click go to the basic settings change it to the no managed code then click ok then you have to recycle it now let me try to run my application okay it's providing this 403 error because we have created the website not provided any files in the particular folder so basically if you are using this visual studio we have the option for the publish we supposed to right click and we will publish once the publish is completed we will get the files then we have to move all the files in our particular folder so here also we are going to follow the same steps so so let me go to the new terminal so we have the commands for generating the publish files so dotnet publish so actually we are doing this release so we are keeping all files in the public folder so before going to the publish i have to run one command for bullet if there is any bullet error we need to check first okay there is no build error you can see like a publish is succeeded and we have the five warnings that's okay and we don't have any error so we can proceed with our publish and also i need to one more check b how to install this dotnet core runtime windows hosting bundle okay so i'm having this link i will share this link also in the description you have to enter this link it will automatically download the particular package if it's not downloaded you have to click this link so once it's downloaded you have to install in your machine that is the mandatory thing so now let me continue with my publishing so the file for placing is completed now you can see one new folder is added so inside that we have the files so let me go to the application folder so in the publish i'm going to copy all the files now let me go to the ies here right click and explore it i'm moving all the files into our ies path okay we have done now i need to do one small change in our app settings.json so basically i have provided the connection stringers windows authentication so i need to change into the sql authentication so i'm just removing this trusted connection pro instead of that i am providing the user id and password and also this multiple active result set also true so let me save it so the changes are fine now let me go to the is i'm just restarting and also in the browser side so let me repress it okay i'm getting this http error 404 so i'm already added the log also let me go to the log folder so here you have to see our application is running in the port of h082 and the environment is production and our application path actually we are getting this 404 error so already i know the url for one of the services called customer slash getall actually i'm getting the response okay so let me check the log also so the lag also i can see the same information so it's requesting for this get all method in the customer controller and then it's executing this below command finally i'm getting the responses 200 so in the development time basically we will see all the results in the swagger so if i'm providing swagger like this still i'm getting the for not for error only but in the development it should be work why because we have one small change in our middleware so let me go to the program.cs file we are enabling the swagger for if it is your only development in the production we are not enabled so let me take the build once again so here after we are going to use this swagger for anywhere okay done and i am going to execute the command for creating the build and let me remove this existing publish file why because sometime it's not going to overwrite the existing dll okay the publish is completed let me go to the folder so except this app settings i'm going to copy all the files and also i need to stop this ia server so then let me right click and explore it one second i'm pasting all the files actually we need to replace all the files replace the files in the destination it's fine okay except this app settings.json uh we have changed all the files way because we have in case if i am changing this file also i need to change the connection string once again so we have done let me go to the ia server i am going to start it once again and let me go to the browser now if i'm trying to refresh this one so it will work so now we are able to see our swagger way so now let me try to execute the scatter method okay it's returning the response so let me copy the same code i'm going to use in the get backward method okay this one also working fine and this invoice header hopefully this one also work and our default apa so everything is working fine so let me reiterate what actually we have done so the first thing is we have created the brand new site so the second step is we have installed this dotnet core 6.0 runtime windows hosting bundle so for that i will provide the link in our description so finally we have taken the publish and moved the files into our actual folder and in this ies server i changed this data clr version into no managed record so then we just started our application it's working fine still if you have any doubts or clarification please post in the comment box and also please don't forget to subscribe my channel thank you thanks for watching
Info
Channel: Nihira Techiees
Views: 31,928
Rating: undefined out of 5
Keywords: Hosting .NET Core 6.0 Web API in IIS Server using VS Code, .NET Core 6.0 deployment from VS Code, how to publish .NET Core from VS Code, how to deploy .net core 6.0 Web api from Visual studio code, can we take publish from VS Code, how to build .NET Core application from visual studio code, how to install windows hosting bundle, how to do deployment .NET Core in IIS Server, .NET Core in VS Code, how to enable IIS in windows, .NET Core 6.0 Web API deployment in IIS Server from VS Code
Id: 1Dplvq6Clho
Channel Id: undefined
Length: 10min 38sec (638 seconds)
Published: Fri Jul 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.