While developing ASP.NET application in Visual Studio we normally use the IIS Express Web Server for running the project.Though this serves the purpose in most of the cases but many times we need to host our application on the Local IIS Web Server instead of inbuilt IIS Express.In prior versions of ASP.NET this could be done by publishing the application in IIS and them attaching the Visual Studio debugger.
In ASP.NET Core this is simplified.Following are the steps for debugging the application in IIS:
1.Click on project properties in the solution explorer
2.Following window will open
3.Click on new button next to Profile.Enter the name you want to use as your profile.Here we have entered IIS.Click OK button.
4.In the main properties window–> debug tab ,the name which you have entered will be displayed in the profile dropdown.In the launch dropdown select IIS .Application URL will come by default in App URL.
After selecting the IIS profile in the dropwdown if you save then you can see that a section for IIS is added to launchSettings.json
Now in the list of debugging options a new option for IIS will be visible in the main Visual Studio Window