Hello Readers, in this post I am going to discuss the publishing and deployment process of a .NET Core 1.0 website on IIS.
Getting the required files for hosting on IIS
- First thing we need to make sure that we are including all required folders in our publish. If you have your application using the blank .NET Core template then go to project.json. You will see settings for publish options like below
- "publishOptions": {
- "include": [
- "wwwroot",
- "web.config"
- ]
- }
Replace the above publish options with the following
- "publishOptions": {
- "include": [
- "wwwroot",
- "Views",
- "Areas/**/Views",
- "appsettings.json",
- "web.config"
- ]
- }
Please note that you need to include the your .json files with correct name. So our necessary folders are now included for publishing.
- Now the next step is to publish the website. Please follow the screenshots along with instructions

Select Publish - Go to your application under src folder.
- Right click and select Publish option.
- Now the publish box opens up.
- Select the custom option.
- Add profile name as localhost(you can give anything you like)

- After profile is added you will be given screen for selecting Publishing Method and location where published files should be placed.
- Click next and you will get to settings screen of publish window
- Make sure you select the configuration as Release
- Make sure to check the checkbox for Delete all existing files prior to publish(This will make sure that files in publish folder will just be for our application)
- Now click on Publish. VS will publish the required files in the selected folder and you will see the following message on output window of Visual Studio





DavePosted Feb 28, 2019, 2:08 PM
Bummer, I hoped it would work with DotNetCore 2.1 , unfortunately, get the dreaded 404 error, so, back to days of trial and error. UGH!
Kishor TalaPosted Apr 17, 2018, 3:10 AM
Really its help me out. I have deployed my site on IIS, but I forgot to install "Kestrel server" for creating reverseproxy. Thannks #Manoj
Priyanka KalePosted Feb 8, 2018, 3:34 AM
Brilliant article. The information I have been searching precisely. It helped me a lot, thanks. Keep coming with more such informative article. Would love to follow them.
Coa CoroPosted Mar 22, 2017, 9:22 AM
Thank you! very practical when I just want to test the asp.net core deployment. Note: The screenshot of the IIS Manager under Publishing with Visual Studio doesn't seem to fit with the section.
humberto moriPosted Mar 10, 2017, 2:19 PM
I'm thrilled, you have great post. thanks for ever.