I am using IIS 8.5 (Windows 8.1). I tried to create a website to my local IIS using the appcmd tool. I used those pages as reference (I know they are for IIS 7 but I couldn't find the equivalent for IIS 8):

Here is the command I used:

appcmd add site /name:fakeAbsorbApi /physicalPath:C:\development\ecms\build\deploy\fakeAbsorbApi /bindings:http:/*:9898

I receive the following feeedback:

SITE object "fakeAbsorbApi" added
APP object "fakeAbsorbApi/" added
VDIR object fakeAbsorbApi/" added

but if I check my IIS Manager, it shows the website as "unknown," and I can't do anything with it. (It seems that the web config is not being detected)

enter image description here

I tried to create the same website using the same parameters via IIS Manager (pointing to the very same folder) and the website it created works perfectly.

Anything I am missing?

有帮助吗?

解决方案 2

Hey it looks like you have an extra colon on the bindings flag. Also you need to add a host header after the port number. I fixed it below.

C:\Windows\System32\inetsrv>appcmd add site /name:fakeAbsorbApi /physicalPath:C:\development\ecms\build\deploy\fakeAbsorbApi /bindings:http/*:9898:www.domain.com

其他提示

If you do not include an Application Pool in your arguments, appcmd may choose the "DefaultAppPool" for you. If that app pool does not exist, the site will be created in the "Unknown" state.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top