| Step to publish Web API on IIS Server?
In below step first we will publish asp.net web api then will host on to the server. Below are the different steps to publish and deploy the Web API.
(1)First we will build ASP.NET web API project and solution in release mode.
(2)Now in next step we will right click on Web API project and click "Publish" menu as given in below screen
(3)In next step Publish Web pane is opened where we need to click on Profile tab on left. And there is "Select or import a public profile" in which you can either choose existing one or create new publish profile as in the below image
after that we will click on ok and move on the connection tab in publish web.
(4)In next screen we will get below screen where we choose the File System in publish method and choose desired location in Target Location which we will used to map IIS.
(5)Now we choose configuration mode Release as in the following image and click on Next button.
There are some options such as Delete all existing files prior to publish which means it delete all existing files in target location publish folder and create new files.
(6)Now we get publish preview which shows publish path and profile name.
Now click on publish button and all published files created at target location as in the following image
Now to Host below are the three step
(1)Open IIS by click inetmgr
(2)In the IIS manager, Right click on Sites under Connections pane as in the following image
(3)In last step we will put sitename,application pool and also physical path as gievne below
Now API IS ready for test | | |