Windows 2025
Sponsored Link

IIS : Install ASP.NET feature2024/12/18

 

Install ASP.NET feature to configure Web Application environment.

[1] Run PowerShell with Admin Privilege and Configure.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# install ASP.NET 4.8
# if also install ASP.NET 3.5, specify [Web-Asp-Net] with comma separated
PS C:\Users\Administrator> Install-WindowsFeature Web-Asp-Net45 

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    No             Success        {ASP.NET 4.8, Application Development, ASP...

# create a test page to verify (example below is with C#)
PS C:\Users\Administrator> $str_document = @'
<%@ Page Language="C#" %>
<script runat="server">
    private void Page_Load() {
        Msg.Text = "Hello ASP.NET World!";
    }
</script>
<html>
<body>
    <asp:Label runat="server" id="Msg" />
</body>
</html>
'@ 

# redirect contents to a page
PS C:\Users\Administrator> $str_document > C:\inetpub\newsite\index.aspx 

# verify accesses
PS C:\Users\Administrator> curl.exe https://rx-7.srv.world/index.aspx 

<html>
<body>
    <span id="Msg">Hello ASP.NET World!</span>
</body>
</html>
IIS : Install ASP.NET feature (GUI)
 
On GUI configuration, set like follows.
[2] Run [Start] - [Server Manager] and enter [Add roles and features], then check a box [ASP.NET 4.8] like follows. (if install ASP.NET 3.5, check a box, too)
[3] Addtional features are required to add ASP.NET, Click [Add Features] button and proceed to Install.
[4] After finishing installation, create a test page to verify working.
[5] That's OK if test aspx page returns normally.
Matched Content