< remove assembly =" *">之间的差异和< clear />?

问题描述:

MSDN文章  删除元素对于用于编译的程序集(ASP.NET设置架构) 并未说汇编属性可以接受星号,但在此示例中显示的是
。 

The MSDN article remove Element for assemblies for compilation (ASP.NET Settings Schema) doesn't say the assembly attribute can accept asterisk, but in the example this usage shows up. 

您是否可以澄清  < remove assembly =" *"> 是否有效?

Can you clarify if <remove assembly="*"> is valid or not?

如果有效,与< clear /> 有什么区别?

If it's valid, what are the differences to <clear/>?

正如你所说,这是一个ASP.NET设置架构,这个问题应该是发布在
Asp.Net论坛以获得更好的支持。

As you said, this is a ASP.NET Settings Schema, this issue should be posted in Asp.Net forum for better support.

但我会尽力帮助你。

>>您能澄清一下  < remove assembly =" *"> 是否有效?

>>Can you clarify if <remove assembly="*"> is valid or not?

这是有效的。形成我的观点。来自MSDN的以下示例告诉我们,我们可以使用< remove>要删除单个程序集,我们也可以使用* w ildcards来匹配所有。

It is valid. Form my point of view. The following sample from MSDN tell us that we can use <remove> to remove a single assembly, we also can use * wildcards to match all.

<configuration>
   <system.web>
      <compilation defaultLanguage="VB">
         <assemblies>
            <remove assembly="ADODB"/>
            <remove assembly="*"/>
         </assemblies>
      </compilation>
   </system.web>
</configuration>

这里我还创建了一个样本

Here I also create a sample

 <system.webServer>
    <handlers>
      <remove name="BlockViewHandler"/>
      
      <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
    </handlers>
  </system.webServer>

请注意 path =" *" verb =" *"

>>如果它有效,与  < clear /> 的区别是什么code>

>>If it's valid, what are the differences to <clear/>

现在专注于< clear />,根据我的理解,它与< Clear />相同。但是这个博客说
使用< remove>使用web.config标记可能会有所帮助。因此,您还需要小心使用remove assembly =" *"

Now focus on <clear/>, per my understanding, it is the same as <Clear/>. but this blog said Using the <remove> tag with web.config can be helpful. So you also need to be careful to use remove assembly="*"

祝你好运,

Kristin