Reputation: 1139
I have an ASP.NET web service application that I want to run on a port other than port 80. I found this article on binding:
http://www.iis.net/configreference/system.applicationhost/sites/site/bindings/binding
But I can't figure out how to implement it properly. The GUI method it describes seems the easiest but step 3 says:
- In the Actions pane, click Bindings...
As you can see, that option doesn't exist for me (IIS 8.5):
They also provide this configuration sample:
<site name="Contoso" id="2">
<application path="/" applicationPool="Contoso">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
</application>
<bindings>
<binding protocol="http" bindingInformation="192.168.0.1:80:www.contoso.com" />
<binding protocol="https" bindingInformation="*:443:" />
</bindings>
</site>
I'm assuming that goes in the web.config? I get a configuration error that says Unrecognized configuration section system.applicationHost
when I add it like this:
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.applicationHost>
<sites>
<site name="MyWebService" id="1">
<bindings>
<binding protocol="http" bindingInformation="*:443" />
</bindings>
</site>
</sites>
</system.applicationHost>
<!-- more stuff I didn't mess with beyond here -->
But when I remove the system.applicationHost
tag, I just get a different error. What am I doing wrong?
Thanks!
Upvotes: 0
Views: 1784
Reputation: 7792
You can choose either of above options to achieve what you want.
Upvotes: 2