Configuring Windows Server Core for ASP.NET

I was recently working on Windows ServerCore and had to dig around for setting up the server for running ASP.NET and also do mundane tasks around adding applications to IIS and configuring the app pools.
 Following is a list of commands for anyone working on ServerCore. These commands cover the basic tasks anyone has to deal with while configuring the server for AspNet scenarios.
Machine Settings
Network configuration

netdom renamecomputer %computername%  /newname:{newComputerName}

netdom join %computername% /d:{domainName}  /ud:{domain\Username} /pd:*

Net localgroup Administrators :{domain\Username} /add


Allow Remote Management in the Firewall and enable Remote Administration . . . . . .

netsh advfirewall set allprofiles settings remotemanagement enable 


Shutdown /r

shutdown /r /t 0  


There is non on Windows server core so you use the following tool wevtutil.exe

wevtutil.exe qe System /rd:true /c:3 /f:text

wevtutil.exe qe Application /rd:true /c:3 /f:text 


Install IIS and set remote management


Dism /online /enable-feature /featurename: IIS-ManagementService

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WebManagement\Server /v EnableRemoteManagement /t REG_DWORD /d 1

Configuring ASP.NET applications and application pools


  1. "appcmd list app" will list the applications
  1. "appcmd add app /"Default Web Site" /physicalpath:"C:\test\Foo" /path:/Foo"
  2. "appcmd set app "Default Web Site" /?"  To  list all the properties supported by the website
  1. "appcmd set app "Default Web Site/Foo" /?"  To  list all the properties supported by the app
  1. "appcmd set app "Default Web Site/Foo" /applicationPool:[AppPoolName]"  to set the app pool that you want this app to run on. By default it is  defaultapppool


  1. "appcmd list apppools" will list the app pools along with Fx version and pipeline modes
  1. "appcmd set apppool "DefaultAppPool" /?"  To  list all the properties supported
  2. "appcmd set apppool "DefaultAppPool"  /enable32BitAppOnWin64:[true|false]"
  1. "appcmd set apppool "DefaultAppPool" /managedPipelineMode:[Integrated|Classic]"
  2. "appcmd set apppool "DefaultAppPool" /managedRuntimeVersion:[v2.0|v4.0]"

Accessing ASP.NET features like Session State Service and PerfCounters

AspNet State Service


Sc query type= service state= all

Sc qc aspnet_state


Sc start aspnet_state


Sc pause aspnet_state


Sc continue aspnet_state


Sc stop aspnet_state



Use typeperf.exe(


typeperf.exe -q "ASP.NET v4.0.30319"

Sample output

\ASP.NET v4.0.30319\Application Restarts

\ASP.NET v4.0.30319\Applications Running

\ASP.NET v4.0.30319\Requests Disconnected


Verify the perfcounter count

typeperf.exe "\ASP.NET Applications v4.0.30319(*)\Requests Total" -sc 2


Primer on server core commands

Enable automatic updates and force an update . . . . . .

Scregedit.wsf /au 4

start /w net stop Wuauserv

net start Wuauserv

wuauclt /detectnow


Kill a process

taskkill /PID <process ID>

Comments (0)

Skip to main content