这在ASP.Net是IIS管理更好:WMI或ADSI或托管API?这有什么区别? [英] Which is better for IIS administration in ASP.Net : WMI or ADSI or Managed API? and what's the difference?

查看:196
本文介绍了这在ASP.Net是IIS管理更好:WMI或ADSI或托管API?这有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的配置和操作和控制IIS 6.0及更高版本。我正在考虑WMI,ADSI,托管API为我的选择。

I am working on Configuring and manipulating and controlling IIS 6.0 and later versions using ASP.Net based web application. I am considering WMI, ADSI, Managed API as my options.

我有一个目标Windows系统WIN2K3或更高版本。语言的选择是C#和应用程序必须使用ASP.Net建

I have a target Windows System WIN2k3 or later versions. The choice of language is C# and the application has to be built using ASP.Net.

本文介绍了每一种方法,但我有点不确定各种各样的东西;
http://learn.iis.net/page的.aspx / 283 /配置 - 选项 - 在IIS7 /转/ 1

This article describes each of the methods but i am a bit unsure about various things; http://learn.iis.net/page.aspx/283/provisioning-options-in-iis7/rev/1

我有一个关于这些选项下面的问题。

I have the following questions regarding these options.


  1. 这是更好或更强大的既定目标? ADSI(的System.DirectoryServices)或WMI(Microsoft.Web.Management)或托管API(Microsoft.Web.Administratoion)?纠正我,如果我在这里做得不对。

  1. Which is better or more powerful for the stated goal? ADSI(System.DirectoryServices) or WMI(Microsoft.Web.Management) or Managed API (Microsoft.Web.Administratoion)? Correct me if i am doing something wrong here.

哪个选项或技术很可能更高版本的IIS予以支持?

Which option or technology is likely to be supported for later versions of IIS?

我不太可能对II5.1或以下工作。所以兼容性区与IIS 6.0及以上版本开始。应用程序必须使用ASP.Net和未管理code。如果无法避免,可以使用建。

I am less likely to work on II5.1 or below. So the compatibility zone starts from IIS 6.0 and above. The application has to be built using ASP.Net and un-managed code may be used if unavoidable.

感谢

问候

史蒂夫

推荐答案

有关IIS6我使用的 的System.DirectoryServices 命名空间是围绕ADSI的托管包装。我觉得这是比较简单,与IIS WMI提供程序一起使用。

For IIS6 I'd use the System.DirectoryServices namespace which is a managed wrapper around ADSI. I find this simpler to use compared to working with the IIS WMI providers.

有关IIS7,并作为<一个href=\"http://stackoverflow.com/questions/2226795/which-is-better-for-iis-administration-in-asp-net-wmi-or-adsi-or-managed-api-a/2226909#2226909\">$p$pcipitous建议,我会使用新的IIS 7托管code管理API( Microsoft.Web.Administration 等)。您可以使用它保持旧式ADSI API的消费者(但围绕新的IIS7组件的包装),他们大多工作在IIS7在IIS6兼容性组件。

For IIS7, and as Precipitous suggested, I'd use the new IIS 7 Managed Code Administration API (Microsoft.Web.Administration et al) . You can use the IIS6 compatibility components on IIS7 which maintain the old style ADSI API's for consumers (but are a wrapper around the new IIS7 components) and they mostly work.

不过你遇到的ADSI包装问题。例如他们是无知的处理程序映射(类似于一个IIS6脚本映射),如 preConditions 其中,例如,允许ASP.NET的处理器映射的多个版本的性能定义共同驻留在相同的网站或应用程序。在ADSI兼容层将创建称为 AboMapperCustom 对象这是在其配置中欠佳,并没有意识到这些新功能的对象。

However you do encounter problems with the ADSI wrappers. For example they are ignorant of Handler Mapping (analogous to an IIS6 Script Map) properties such as preConditions which, for example, permit multiple versions of ASP.NET's handler mapping definitions to co-reside in the same site or application. The ADSI compatibility layer will create objects known as AboMapperCustom objects which are sub-optimal in their configuration and are not aware of these new features.

有两个code-基地(一个用于IIS6和一个用于IIS7)可能看起来像很多工作,但说实话这是不是太糟糕。我的主机托管服务提供商的工作,一直沿着这条道路,我们咬咬牙决定,我们会维护旧的IIS6 code,但与IIS7重新开始。

Having two code-bases (one for IIS6 and one for IIS7) may seem like a lot of work, but to be honest it isn't too bad. I work for a hoster, have been down this road, and we bit the bullet and decided that we'd maintain the old IIS6 code but start afresh with IIS7.

这篇关于这在ASP.Net是IIS管理更好:WMI或ADSI或托管API?这有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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