For my .NET Framework 4.6.1 project, I was able to start my server by these 2 lines of PowerShell script.
PS> cd "C:\Program Files (x86)\IIS Express\"
PS> ./iisexpress /config:E:\Repos\MyProjectFolder\.vs\SolutionName\config\applicationhost.config /site:MyProjectName
To find the equivalent script for your project I recommend the following.
- Find the location of
applicationhost.config file. IIS Express uses this file to start the projects in Visual Studio. It usually resides in .vs folder. Here's the complete path E:\Repos\MyProjectFolder\.vs\SolutionName\config\applicationhost.config
- Find
iisexpress.exe. For me, path is C:\Program Files (x86)\IIS Express\iisexpress.exe.
- Start IIS Express server by specifying the
applicationhost.config full path and the site you wish to start.
NOTE: The site/project must be listed on your applicationhost.config file like shown below.
<sites>
<site name="MyProjectName" id="1">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\Repos\MyProjectFolder\" />
</application>
<bindings>
<binding protocol="https" bindingInformation="*:44466:localhost" />
<binding protocol="http" bindingInformation="*:12435:localhost" />
</bindings>
</site>
</sites>
dotnet run, so that's a misunderstanding. See blog.lextudio.com/…