This article briefly describes how you can publish ASP.NET pages on a localhost for development purposes.
The same concepts apply, though, when deploying an ASP.NET application to a remote Web server.
To be accessible to Web-based clients such as browsers ( and Intenet-enabled mobile devices ), ASP.NET pages must be hosted on a Microsoft Windows® Server operating system with ASP.NET and Internet Information Services, or IIS, the Web server component of Microsoft Windows operating systems, installed.
NOTE: Although newer versions of Web development tools such as Visual Studio does not require IIS for development purposes, the discussions here focus on developing applications for actual deployment.
IIS is usually installed by default with the server operating system unless otherwise specified. If not, simply install it from your Windows installation CD.
For Windows 11 and later:
- Click Start, point to Control Panel, and click Programs and Features.
- When the Uninstall or change a program dialog appears, select Turn Windows features on or off.
- When the Windows Features dialog appears, scroll down the list of components and select Internet Information Services (IIS), and click OK.
The .NET Framework SDK or Visual Studio .NET products install ASP.NET as a part of the setup process. If you are using earlier OS, .NET or VS versions, ASP.NET is a separate component that is available for download from the Microsoft ASP.NET site.
For ASP.NET files to run, the directory where your ASP.NET files reside must be configured as an application root in IIS.
NOTE: You must have system administrator privileges to be able to create an application.
For Windows 11 and later:
- Type inetmgr in the searchbox, if searchbox is available on the taskbar.
- Or, press the Windows key, then type inetmgr in the searchbox that will display.
- Or, click Start, click Control Panel, in All Control Panel Items tab, scroll down the list of components and select Windows Tools, then select Internet Information Services.
For older Windows OS:
- Click Start, click Run, then type inetmgr in the Open textbox.
- Or, click Start, point to Administrative Tools, then click Internet Information Services.
If you do not see Administrative Tools on your Start Menu as shown above, click Start, point to Control Panel, point to Administrative Tools, then click Internet Information Services.
For Windows 11 and later:
- In IIS, right-click on the Web site to which you want to add an application ( for this purpose, choose the Default Web Site ), then select Add application.
- In the Add Application dialog, enter your preferred application name and the directory where your ASP.NET files reside.
The below image shows how the application directory of this workshop is configured in the author’s local Web server ( under the default IIS Web site ), along with another application ( ogre.ph ). You should see something similar in your IIS admin console once your application has been setup.