Programatically set an ASP.NET website bindings for an IIS7 site?(以编程方式为 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
- http://foo.mysite.com 80
- http://bar.mysite.com 80
- http://www.mysite.com 80
- http://foo.mysite.com 80
- http://bar.mysite.com 80
- 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 网站绑定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:以编程方式为 IIS7 站点设置 ASP.NET 网站绑定?


- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 输入按键事件处理程序 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01