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 rx-7.srv.world/index.aspx
<html>
<body>
<span id="Msg">Hello ASP.NET World!</span>
</body>
</html>
|