找出 IIS Express 8.0 的正确命令行值

Figure out the right command line value for IIS Express 8.0

我有一个自定义 ASP.NET MVC 4 解决方案,我使用 IIS Express 通过 Visual Studio (v2013) 进行托管。 IIS Express通过Visual Studio正常托管应用程序,而命令行调用启动应用程序,但所有请求都以404错误结束。

我的示例命令行调用:

"c:\Program Files (x86)\IIS Express\iisexpress.exe" /path:"<path to my site>" /port:7888 /trace:e

...以及一个请求的输出(如果 运行 通过 VS,相同的请求 Url 工作正常):

Initializing the W3 Server Started CTC = 548189463
W3 Server initializing WinSock.  CTC = 548189463
W3 Server WinSock initialized.  CTC = 548189463
W3 Server ThreadPool initialized (ipm has signalled).  CTC = 548189463
Start listenerChannel http:0
Successfully registered URL "http://localhost:7888/" for site "Development Web S
ite" application "/"
Registration completed
AppPool 'IISExpressAppPool' initialized
InitComplete event signalled
IncrementMessages called
Request started: "GET" http://localhost:7888/
Request ended: http://localhost:7888/ with HTTP status 404.0

我想如果我使用与 VS 相同的命令行,它应该可以工作。怎么看VS在幕后做了什么?

Holly bull,这是路径参数 - 它必须是绝对路径,IIS Express 不能正常使用相对路径。