-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
HostingEnvironmentSection.xml
293 lines (265 loc) · 20.1 KB
/
HostingEnvironmentSection.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<Type Name="HostingEnvironmentSection" FullName="System.Web.Configuration.HostingEnvironmentSection">
<TypeSignature Language="C#" Value="public sealed class HostingEnvironmentSection : System.Configuration.ConfigurationSection" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed HostingEnvironmentSection extends System.Configuration.ConfigurationSection" />
<TypeSignature Language="DocId" Value="T:System.Web.Configuration.HostingEnvironmentSection" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class HostingEnvironmentSection
Inherits ConfigurationSection" />
<TypeSignature Language="F#" Value="type HostingEnvironmentSection = class
 inherit ConfigurationSection" />
<TypeSignature Language="C++ CLI" Value="public ref class HostingEnvironmentSection sealed : System::Configuration::ConfigurationSection" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Configuration.ConfigurationSection</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Defines configuration settings that control the behavior of the application hosting environment. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.HostingEnvironmentSection> class provides a way to programmatically access and modify the values of the <xref:System.Web.Configuration.HostingEnvironmentSection> section in the configuration file.When an ASP.NET application is unused for a specified amount of time, it can be unloaded from memory based on the <xref:System.Web.Configuration.HostingEnvironmentSection.IdleTimeout%2A> and <xref:System.Web.Configuration.HostingEnvironmentSection.ShutdownTimeout%2A> properties.
## Examples
This example demonstrates how to specify values declaratively for several attributes of the [hostingEnvironment Element (ASP.NET Settings Schema)](https://msdn.microsoft.com/library/043a75c8-231a-4f8d-9633-501530bd7d40) section, which can also be accessed as members of the <xref:System.Web.Configuration.HostingEnvironmentSection> class.
The following configuration file example shows how to specify values declaratively for the [hostingEnvironment Element (ASP.NET Settings Schema)](https://msdn.microsoft.com/library/043a75c8-231a-4f8d-9633-501530bd7d40) section.
```
<system.web>
<hostingEnvironment
idleTimeout="20"
shutdownTimeout="30"
/>
</system.web>
```
The following code example demonstrates how to use the <xref:System.Web.Configuration.HostingEnvironmentSection> class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.HostingEnvironmentSection/CS/hostingenvironmentsection.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.HostingEnvironmentSection/VB/hostingenvironmentsection.vb" id="Snippet1":::
]]></format>
</remarks>
<altmember cref="T:System.Configuration.ConfigurationSection" />
<altmember cref="T:System.Web.Hosting.HostingEnvironment" />
<altmember cref="P:System.Web.Configuration.HostingEnvironmentSection.IdleTimeout" />
<altmember cref="P:System.Web.Configuration.HostingEnvironmentSection.ShutdownTimeout" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HostingEnvironmentSection ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Configuration.HostingEnvironmentSection.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 HostingEnvironmentSection();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.Configuration.HostingEnvironmentSection" /> class by using default settings.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.Configuration.HostingEnvironmentSection.%23ctor%2A> constructor is not intended to be used directly from your code. It is called by the ASP.NET configuration system. You obtain an instance of the <xref:System.Web.Configuration.HostingEnvironmentSection> class by using the <xref:System.Configuration.Configuration.GetSection%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IdleTimeout">
<MemberSignature Language="C#" Value="public TimeSpan IdleTimeout { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.TimeSpan IdleTimeout" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.HostingEnvironmentSection.IdleTimeout" />
<MemberSignature Language="VB.NET" Value="Public Property IdleTimeout As TimeSpan" />
<MemberSignature Language="F#" Value="member this.IdleTimeout : TimeSpan with get, set" Usage="System.Web.Configuration.HostingEnvironmentSection.IdleTimeout" />
<MemberSignature Language="C++ CLI" Value="public:
 property TimeSpan IdleTimeout { TimeSpan get(); void set(TimeSpan value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("idleTimeout", DefaultValue="10675199.02:48:05.4775807")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("idleTimeout", DefaultValue="10675199.02:48:05.4775807")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the amount of time, in minutes, before unloading an inactive application.</summary>
<value>A <see cref="T:System.TimeSpan" /> that is the specified number of minutes before unloading an inactive application.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value for the <xref:System.Web.Configuration.HostingEnvironmentSection.IdleTimeout%2A> property is "Infinite". This setting can be set at the machine or application level. If this setting is defined at any other level, it is ignored.
## Examples
The following code example shows how to use the <xref:System.Web.Configuration.HostingEnvironmentSection.IdleTimeout%2A> property. This code example is part of a larger example provided for the <xref:System.Web.Configuration.HostingEnvironmentSection> class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.HostingEnvironmentSection/CS/hostingenvironmentsection.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.HostingEnvironmentSection/VB/hostingenvironmentsection.vb" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Properties">
<MemberSignature Language="C#" Value="protected override System.Configuration.ConfigurationPropertyCollection Properties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Configuration.ConfigurationPropertyCollection Properties" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.HostingEnvironmentSection.Properties" />
<MemberSignature Language="VB.NET" Value="Protected Overrides ReadOnly Property Properties As ConfigurationPropertyCollection" />
<MemberSignature Language="F#" Value="member this.Properties : System.Configuration.ConfigurationPropertyCollection" Usage="System.Web.Configuration.HostingEnvironmentSection.Properties" />
<MemberSignature Language="C++ CLI" Value="protected:
 virtual property System::Configuration::ConfigurationPropertyCollection ^ Properties { System::Configuration::ConfigurationPropertyCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Configuration.ConfigurationPropertyCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShadowCopyBinAssemblies">
<MemberSignature Language="C#" Value="public bool ShadowCopyBinAssemblies { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ShadowCopyBinAssemblies" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.HostingEnvironmentSection.ShadowCopyBinAssemblies" />
<MemberSignature Language="VB.NET" Value="Public Property ShadowCopyBinAssemblies As Boolean" />
<MemberSignature Language="F#" Value="member this.ShadowCopyBinAssemblies : bool with get, set" Usage="System.Web.Configuration.HostingEnvironmentSection.ShadowCopyBinAssemblies" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool ShadowCopyBinAssemblies { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("shadowCopyBinAssemblies", DefaultValue=true)]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("shadowCopyBinAssemblies", DefaultValue=true)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the assemblies of an application in Bin are shadow copied to the application's ASP.NET Temporary Files directory.</summary>
<value>
<see langword="true" /> if the assemblies of an application in Bin are shadow copied to the application's ASP.NET Temporary Files directory; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ShutdownTimeout">
<MemberSignature Language="C#" Value="public TimeSpan ShutdownTimeout { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.TimeSpan ShutdownTimeout" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.HostingEnvironmentSection.ShutdownTimeout" />
<MemberSignature Language="VB.NET" Value="Public Property ShutdownTimeout As TimeSpan" />
<MemberSignature Language="F#" Value="member this.ShutdownTimeout : TimeSpan with get, set" Usage="System.Web.Configuration.HostingEnvironmentSection.ShutdownTimeout" />
<MemberSignature Language="C++ CLI" Value="public:
 property TimeSpan ShutdownTimeout { TimeSpan get(); void set(TimeSpan value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:00:30")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:00:30")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the amount of time, in seconds, to gracefully shut down the application.</summary>
<value>A <see cref="T:System.TimeSpan" /> that is the specified number of seconds to gracefully shut down the application. The default is 30 seconds.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value for the <xref:System.Web.Configuration.HostingEnvironmentSection.ShutdownTimeout%2A> property is 30 seconds. This setting can be set at the machine or application level. If this setting is defined at any other configuration level, it is ignored. If a debugger is attached to the application, the application will not be shut down.
## Examples
The following code example shows how to use the <xref:System.Web.Configuration.HostingEnvironmentSection.ShutdownTimeout%2A> property. This code example is part of a larger example provided for the <xref:System.Web.Configuration.HostingEnvironmentSection> class.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Web.Configuration.HostingEnvironmentSection/CS/hostingenvironmentsection.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Configuration.HostingEnvironmentSection/VB/hostingenvironmentsection.vb" id="Snippet3":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="UrlMetadataSlidingExpiration">
<MemberSignature Language="C#" Value="public TimeSpan UrlMetadataSlidingExpiration { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.TimeSpan UrlMetadataSlidingExpiration" />
<MemberSignature Language="DocId" Value="P:System.Web.Configuration.HostingEnvironmentSection.UrlMetadataSlidingExpiration" />
<MemberSignature Language="VB.NET" Value="Public Property UrlMetadataSlidingExpiration As TimeSpan" />
<MemberSignature Language="F#" Value="member this.UrlMetadataSlidingExpiration : TimeSpan with get, set" Usage="System.Web.Configuration.HostingEnvironmentSection.UrlMetadataSlidingExpiration" />
<MemberSignature Language="C++ CLI" Value="public:
 property TimeSpan UrlMetadataSlidingExpiration { TimeSpan get(); void set(TimeSpan value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Configuration.ConfigurationProperty("urlMetadataSlidingExpiration", DefaultValue="00:01:00")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.ConfigurationProperty("urlMetadataSlidingExpiration", DefaultValue="00:01:00")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]</AttributeName>
<AttributeName Language="F#">[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that determines how ASP.NET caches URL metadata.</summary>
<value>A value that determines how ASP.NET caches URL metadata. The default value is 1 minute.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
An example of URL metadata is information in the Web.config file about security restrictions that apply to a particular URL.
The following values have special meanings:
- "Infinite". URL metadata is cached without a sliding expiration. This means caching continues until the server uses the maximum allotted amount of memory. This is the default behavior in ASP.NET 3.5 and earlier versions.
- "00:00:00". URL metadata is not cached. The metadata is regenerated with every request. This is more efficient for scenarios where the same URL is rarely requested.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>