Programatically set an ASP.NET website bindings for an IIS7 site?

后端 未结 2 1864
误落风尘
误落风尘 2021-01-14 21:01

i\'ve got a simple ASP.NET website that i end up publishing/running on an IIS7 server.

Is it possible to to add into my web.config file some \'binding\' information,

相关标签:
2条回答
  • 2021-01-14 21:24

    I don't know if you can from web.config.

    But if you have some automatic deployment, you can do like this:

    http://bloggingabout.net/blogs/dennis/archive/2008/05/16/programmatically-creating-an-iis7-site.aspx

    0 讨论(0)
  • 2021-01-14 21:26

    Answered on the IIS forums here :-

    Although binding configuration is updated at an individual web-site level, the binding configuration information is stored in the server's applicationHost.config file, not in the individual web.config files under each web site. Allowing individual web-site owners to change the bindings for their web sites is a security risk.

    0 讨论(0)
提交回复
热议问题