In this tutorial, we are going to learn how to host a website in local IIS in windows 10. IIS or Internet Information Services are used to host ASP.Net Web applications to either show your development progress for a client or for a test run of your websites. If you are a freelancer and want to show your sites to your customer, IIS might be your best and easiest way.
Also visit : how to enable IIS How to enable Internet Information Services
Before we start make sure that you have enable IIS on your Windows machine. If not, follow the step provided below.
Blog Topic
I. Enable IIS on Windows 10
It’s really easy to enable Internet Information Services in Windows 10. Internet Information Services (IIS) is a Microsoft-developed extended web server that may be used with Windows NT; also, ASP.NET developers will want to enable IIS , since it is required to host ASP.NET. IIS has an interactive user interface that makes configuring the server simple.
To enable IIS and the required IIS components on Windows 10, do the following:
- Open Control Panel and click Programs and Features » Turn Windows features on or off.
- Enable Internet Information Services.
- Expand the Internet Information Services feature and verify the web server components that is needed for IIS to work. Refer to the required IIS component listed below.
- Click OK.
Required IIS components
- Web Management Tools
- IIS 6 Management Compatibility
- IIS Metabase and IIS 6 configuration compatibility
- IIS Management Console
- IIS 6 Management Compatibility
- World Wide Web Services
- Application Development Features
- .NET Extensibility 4.5
- ASP.NET 4.5
- ISAPI Extensions
- ISAPI Filters
- WebSocket Protocol
- Common HTTP Features
- Default Document
- Static Content
- Security
- Basic Authentication
- Request Filtering
- Windows Authentication
- Application Development Features
II. How to Check IIS Version on Windows 10
- Open Run Command using the shortcut Win Key + R.
- Search for inetmgr.
- Internet Information Services(IIS) manager will open.
- Click on Help.
- Go to “About Internet Information Services“
- “About Internet Information Services manager dialog box will now open, where you can view details on about your IIS.
III. Deploy ASP.NET MVC on IIS
- First, open your IIS Manager by going to the start menu and searching for Internet Information Services(IIS) and open Internet Information Services from the search result. Refer to the image shown below.
You may also use Run then input inetmgr to open IIS Manager.

2. In your IIS manager, expand the sites folder and right click on Default Web Sites. Then select Explore to open the root directory.

3. Once the root directory is open, we can create a folder for our ASP.NET directory location. wwwroot is the default IIS directory, but if you want to select different location, you can specify it later after we are done creating the build files for our ASP.NET MVC Application. In this tutorial, this is the directory that I use. wwwroot » MySites.

4. Now, it’s time to create build file for our sample ASP.NET App. In my case I just pick-up a random project I created from my previous tutorial, you may check it out this link for a sample ASP.NET App “Login App using Form Authentication in ASP.NET MVC“. You may also create a new project just to test IIS deployment.
This is how my sample Web Application looks like.

5. Open your project in Visual Studio and navigate to the solution explorer. Right-click on your project name and select publish.

6. In the Publish Web Window choose Profile and create name for your publish profile.

7. To customize the profile name for this setting you may set a familiar name to easily identify it for the next time you deploy this application. Enter your desired publish profile name. Then press “OK”.

8. Click “Next” to proceed. Select File System as your publish method.

9. Select your published directory. In my case, it is C:\inetpub\wwwroot\MySites, which is the default website directory of IIS. Then click “Open.”

10. Lastly click on the publish button to proceed. See the image below.

11. It may take a while to finish an application to publish. Once, done you can see the notification from the Output windows like the screenshot shown below.

IV. Convert your website to IIS Application
Navigate back to your IIS Manager and go to Sites » Default Web Sites. Then search for your folder name where we published our websites. In my case, I name it MySites. Right-click on the folder name MySites and select Convert to Application.

You’re done!! To open your website application right click on MySites. Select Manage Application then choose browse.

Browser will popup and display your deployed ASP.NET Application. See the image below.

You may also access your websites using your local IP ex. http://192.168.1.2/MySites

Summary
In this tutorial, we have learn how to host a website in local IIS in windows 10. We also lear how we can enable and configure IIS on windows 10. If you wanted to share your website to your team on your local network you can visit this article to know how you can configure IIS to use your local IP address Deploy and Share ASP NET Core WebApp to a Local Network using IIS
That’s it you have successfully publish your website into IIS. Hopefully, this article will give you an idea and can be used with your future project.
KEEP CODING!
Also Read :
Best Computer Services Brisbane