<remove> Element for webRequestModules (Network Settings)
Removes a custom Web request module from the application.
<configuration>
<system.net>
<webRequestModules>
<remove>
Syntax
<remove
prefix="URI prefix"
/>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute | Description |
---|---|
prefix |
The URI prefix for requests handled by this Web request module. |
Child Elements
None.
Parent Elements
Element | Description |
---|---|
webRequestModules | Specifies modules to use to request information from network hosts. |
Remarks
The remove
element removes the registered Web request module for the specified URI prefix.
The value for the prefix
attribute should be the leading characters of a valid URI -- for example, "http
", or "http://www.contoso.com
".
Configuration Files
This element can be used in the application configuration file or the machine configuration file (Machine.config).
Example
The following example removes the existing Web request module for HTTP and then registers a new custom Web request module for HTTP requests to www.contoso.com
.
<configuration>
<system.net>
<webRequestModules>
<remove prefix="http" />
<add prefix="http"
type="System.Net.HttpRequestCreator, System, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
</webRequestModules>
</system.net>
</configuration>
See also
Tilbakemeldinger
https://aka.ms/ContentUserFeedback.
Kommer snart: Gjennom 2024 faser vi ut GitHub Issues som tilbakemeldingsmekanisme for innhold, og erstatter det med et nytt system for tilbakemeldinger. Hvis du vil ha mer informasjon, kan du se:Send inn og vis tilbakemelding for