请观察:
PS D:\> &"C:\Program Files\IIS Express\appcmd.exe" add site /name:MySite /physicalPath:C:\MySite /bindings:http/*:51000:localhost /commit
SITE object "MySite" added
APP object "MySite/" added
VDIR object "MySite/" added
ERROR ( hresult:800700b7, message:Failed to commit configuration changes.
Cannot create a file when that file already exists.
)
最令人沮丧的是它曾经工作一周左右,但现在却没有。
答案 0 :(得分:2)
我找到了原因。 %USERPROFILE%\ Documents \ IISExpress \ config \ applicationhost.config 包含我尝试添加的网站的<location>
项。这导致了错误。