通过编程设置为IIS7网站的ASP.NET网站的绑定? [英] Programatically set an ASP.NET website bindings for an IIS7 site?

查看:148
本文介绍了通过编程设置为IIS7网站的ASP.NET网站的绑定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的ASP.NET网站,我最终发布/ IIS7的服务器上运行。

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

是否有可能加入到我的web.config文件中一些绑定的信息,而不必通过IIS7网站手动设置。

Is it possible to to add into my web.config file some 'binding' information, instead of having to set it manually through the site in IIS7.

如。想象我有以下的绑定

eg. imagine i have the following bindings


  1. http://foo.mysite.com 80

  2. http://bar.mysite.com 80

  3. http://www.mysite.com 80

  1. http://foo.mysite.com 80
  2. http://bar.mysite.com 80
  3. http://www.mysite.com 80

干杯!

推荐答案

回答上的IIS论坛这里: -

Answered on the IIS forums here :-

虽然绑定配置
  在个别网站更新
  水平,结合结构
  信息被存储在服务器的
  applicationHost.config文件,而不是在
  根据个人web.config文件中
  每一个网站。允许单个
  网站所有者更改绑定
  为他们的网站是一个安全
  风险。

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.

这篇关于通过编程设置为IIS7网站的ASP.NET网站的绑定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆