-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
PageRouteHandler.xml
304 lines (285 loc) · 21.9 KB
/
PageRouteHandler.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
294
295
296
297
298
299
300
301
302
303
304
<Type Name="PageRouteHandler" FullName="System.Web.Routing.PageRouteHandler">
<TypeSignature Language="C#" Value="public class PageRouteHandler : System.Web.Routing.IRouteHandler" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit PageRouteHandler extends System.Object implements class System.Web.Routing.IRouteHandler" />
<TypeSignature Language="DocId" Value="T:System.Web.Routing.PageRouteHandler" />
<TypeSignature Language="VB.NET" Value="Public Class PageRouteHandler
Implements IRouteHandler" />
<TypeSignature Language="F#" Value="type PageRouteHandler = class
 interface IRouteHandler" />
<TypeSignature Language="C++ CLI" Value="public ref class PageRouteHandler : System::Web::Routing::IRouteHandler" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Web.Routing.IRouteHandler</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Provides properties and methods for defining how a URL maps to a physical file.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You pass an instance of <xref:System.Web.Routing.PageRouteHandler> to the <xref:System.Web.Routing.Route> constructor in order to map a URL of a physical file. The <xref:System.Web.Routing.PageRouteHandler> object specifies the virtual path of the physical file and determines whether authorization rules for the physical URL is checked.
]]></format>
</remarks>
<altmember cref="T:System.Web.Routing.Route" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/cc668201(v=vs.100)">ASP.NET Routing</related>
<related type="Article" href="https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678">How to: Define Routes for Web Forms Applications</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dd329551(v=vs.140)">Walkthrough: Using ASP.NET Routing in a Web Forms Application</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.Routing.PageRouteHandler" /> class.</summary>
<altmember cref="T:System.Web.Routing.Route" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/cc668201(v=vs.100)">ASP.NET Routing</related>
<related type="Article" href="https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678">How to: Define Routes for Web Forms Applications</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dd329551(v=vs.140)">Walkthrough: Using ASP.NET Routing in a Web Forms Application</related>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PageRouteHandler (string virtualPath);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string virtualPath) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Routing.PageRouteHandler.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (virtualPath As String)" />
<MemberSignature Language="F#" Value="new System.Web.Routing.PageRouteHandler : string -> System.Web.Routing.PageRouteHandler" Usage="new System.Web.Routing.PageRouteHandler virtualPath" />
<MemberSignature Language="C++ CLI" Value="public:
 PageRouteHandler(System::String ^ virtualPath);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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>
<Parameter Name="virtualPath" Type="System.String" />
</Parameters>
<Docs>
<param name="virtualPath">The virtual path of the physical file for this <see cref="P:System.Web.Routing.RouteData.Route" /> object. The file must be located in the current application. Therefore, the path must begin with a tilde (~).</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.Routing.PageRouteHandler" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you use this constructor, the <xref:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess%2A> property is set to `true`.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The <paramref name="virtualPath" /> parameter is <see langword="null" /> or is an empty string or does not start with "~/".</exception>
<altmember cref="T:System.Web.Routing.Route" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/cc668201(v=vs.100)">ASP.NET Routing</related>
<related type="Article" href="https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678">How to: Define Routes for Web Forms Applications</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dd329551(v=vs.140)">Walkthrough: Using ASP.NET Routing in a Web Forms Application</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PageRouteHandler (string virtualPath, bool checkPhysicalUrlAccess);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string virtualPath, bool checkPhysicalUrlAccess) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Routing.PageRouteHandler.#ctor(System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (virtualPath As String, checkPhysicalUrlAccess As Boolean)" />
<MemberSignature Language="F#" Value="new System.Web.Routing.PageRouteHandler : string * bool -> System.Web.Routing.PageRouteHandler" Usage="new System.Web.Routing.PageRouteHandler (virtualPath, checkPhysicalUrlAccess)" />
<MemberSignature Language="C++ CLI" Value="public:
 PageRouteHandler(System::String ^ virtualPath, bool checkPhysicalUrlAccess);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="virtualPath" Type="System.String" />
<Parameter Name="checkPhysicalUrlAccess" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="virtualPath">The virtual path of the physical file of this <see cref="P:System.Web.Routing.RouteData.Route" /> object. The file must be located in the current application. Therefore, the path must begin with a tilde (~).</param>
<param name="checkPhysicalUrlAccess">If this property is set to <see langword="false" />, authorization rules will be applied to the request URL and not to the URL of the physical page. If this property is set to <see langword="true" />, authorization rules will be applied to both the request URL and to the URL of the physical page.</param>
<summary>Initializes a new instance of the <see cref="T:System.Web.Routing.PageRouteHandler" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, the <xref:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess%2A> property is `true`. Therefore, if you want authorization rules to be applied to both the URL of the physical page and to the route URL, you can use the <xref:System.Web.Routing.PageRouteHandler.%23ctor%28System.String%29> constructor instead of this constructor.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The <paramref name="virtualPath" /> parameter is <see langword="null" /> or is an empty string or does not start with "~/".</exception>
<altmember cref="P:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess" />
<altmember cref="T:System.Web.Routing.Route" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/cc668201(v=vs.100)">ASP.NET Routing</related>
<related type="Article" href="https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678">How to: Define Routes for Web Forms Applications</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dd329551(v=vs.140)">Walkthrough: Using ASP.NET Routing in a Web Forms Application</related>
</Docs>
</Member>
<Member MemberName="CheckPhysicalUrlAccess">
<MemberSignature Language="C#" Value="public bool CheckPhysicalUrlAccess { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CheckPhysicalUrlAccess" />
<MemberSignature Language="DocId" Value="P:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CheckPhysicalUrlAccess As Boolean" />
<MemberSignature Language="F#" Value="member this.CheckPhysicalUrlAccess : bool" Usage="System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool CheckPhysicalUrlAccess { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that determines whether authorization rules are applied to the physical file's URL.</summary>
<value>
<see langword="true" /> if authorization is checked for the URL of the physical file that is associated with the route; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can set the <xref:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess%2A> property when you use the <xref:System.Web.Routing.PageRouteHandler.%23ctor%28System.String%2CSystem.Boolean%29> constructor.
The value of the <xref:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess%2A> property determines whether the <xref:System.Web.Routing.PageRouteHandler> object will check security permissions only for the route URL or for both the physical page and the route URL.
When the <xref:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess%2A> property is set to `true` (which is its default value), a user must have permission to access both the route URL and the physical URL. When the <xref:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess%2A> property is set to `false`, a user requires only permission to access the route URL, and permissions for the physical URL are not checked.
Permissions are defined in the Web.config file, as shown in the following example:
```
<configuration>
<location path="categoriespage.aspx">
<system.web>
<authorization>
<allow roles="admin"/>
<deny users="*"/>
</authorization>
</system.web>
</location>
<location path="category">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>
```
For a request URL that contains `Category/food/show` after the domain name, if the route URL pattern is `Category/{action}/{categoryName}` and the physical page is Categoriespage.aspx, ASP.NET applies the permissions defined in the previous example in one of the following ways:
- If the <xref:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess%2A> property is `false`, all users are granted access, because all users are granted access to the URL pattern that starts with `category`.
- If the <xref:System.Web.Routing.PageRouteHandler.CheckPhysicalUrlAccess%2A> property is `true`, only `admin` users are granted access. All users have access to the URL pattern that begins with `category`, but only `admin` users have access to the physical page Categoriespage.aspx.
]]></format>
</remarks>
<altmember cref="T:System.Web.Routing.Route" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/cc668201(v=vs.100)">ASP.NET Routing</related>
<related type="Article" href="https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678">How to: Define Routes for Web Forms Applications</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dd329551(v=vs.140)">Walkthrough: Using ASP.NET Routing in a Web Forms Application</related>
</Docs>
</Member>
<Member MemberName="GetHttpHandler">
<MemberSignature Language="C#" Value="public virtual System.Web.IHttpHandler GetHttpHandler (System.Web.Routing.RequestContext requestContext);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Web.IHttpHandler GetHttpHandler(class System.Web.Routing.RequestContext requestContext) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Routing.PageRouteHandler.GetHttpHandler(System.Web.Routing.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetHttpHandler (requestContext As RequestContext) As IHttpHandler" />
<MemberSignature Language="F#" Value="abstract member GetHttpHandler : System.Web.Routing.RequestContext -> System.Web.IHttpHandler
override this.GetHttpHandler : System.Web.Routing.RequestContext -> System.Web.IHttpHandler" Usage="pageRouteHandler.GetHttpHandler requestContext" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual System::Web::IHttpHandler ^ GetHttpHandler(System::Web::Routing::RequestContext ^ requestContext);" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.Routing.IRouteHandler.GetHttpHandler(System.Web.Routing.RequestContext)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.IHttpHandler</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="requestContext" Type="System.Web.Routing.RequestContext" />
</Parameters>
<Docs>
<param name="requestContext">An object that encapsulates information about the request.</param>
<summary>Returns the object that processes the request.</summary>
<returns>The object that processes the request.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="requestContext" /> parameter is <see langword="null" />.</exception>
<altmember cref="T:System.Web.Routing.Route" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/cc668201(v=vs.100)">ASP.NET Routing</related>
<related type="Article" href="https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678">How to: Define Routes for Web Forms Applications</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dd329551(v=vs.140)">Walkthrough: Using ASP.NET Routing in a Web Forms Application</related>
</Docs>
</Member>
<Member MemberName="GetSubstitutedVirtualPath">
<MemberSignature Language="C#" Value="public string GetSubstitutedVirtualPath (System.Web.Routing.RequestContext requestContext);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetSubstitutedVirtualPath(class System.Web.Routing.RequestContext requestContext) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Routing.PageRouteHandler.GetSubstitutedVirtualPath(System.Web.Routing.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Function GetSubstitutedVirtualPath (requestContext As RequestContext) As String" />
<MemberSignature Language="F#" Value="member this.GetSubstitutedVirtualPath : System.Web.Routing.RequestContext -> string" Usage="pageRouteHandler.GetSubstitutedVirtualPath requestContext" />
<MemberSignature Language="C++ CLI" Value="public:
 System::String ^ GetSubstitutedVirtualPath(System::Web::Routing::RequestContext ^ requestContext);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="requestContext" Type="System.Web.Routing.RequestContext" />
</Parameters>
<Docs>
<param name="requestContext">An object that encapsulates information about the request.</param>
<summary>Returns the virtual path of the physical file for the route after substitutions have been applied to any replacement parameters.</summary>
<returns>The URL of the physical file that was generated from a route.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Web.Routing.PageRouteHandler.VirtualPath%2A> value does not contain any replacement parameters, the <xref:System.Web.Routing.PageRouteHandler.GetSubstitutedVirtualPath%2A> method returns the same value as the <xref:System.Web.Routing.PageRouteHandler.VirtualPath%2A> property.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="requestContext" /> parameter is <see langword="null" />.</exception>
<altmember cref="T:System.Web.Routing.Route" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/cc668201(v=vs.100)">ASP.NET Routing</related>
<related type="Article" href="https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678">How to: Define Routes for Web Forms Applications</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dd329551(v=vs.140)">Walkthrough: Using ASP.NET Routing in a Web Forms Application</related>
</Docs>
</Member>
<Member MemberName="VirtualPath">
<MemberSignature Language="C#" Value="public string VirtualPath { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string VirtualPath" />
<MemberSignature Language="DocId" Value="P:System.Web.Routing.PageRouteHandler.VirtualPath" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property VirtualPath As String" />
<MemberSignature Language="F#" Value="member this.VirtualPath : string" Usage="System.Web.Routing.PageRouteHandler.VirtualPath" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ VirtualPath { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the virtual path of the Web page that is associated with this route.</summary>
<value>The URL of the Web page, before substitutions have been applied for any replacement parameters.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You set the <xref:System.Web.Routing.PageRouteHandler.VirtualPath%2A> property in the <xref:System.Web.Routing.PageRouteHandler.%23ctor%2A?displayProperty=nameWithType> constructor or in the <xref:System.Web.Routing.PageRouteHandler.%23ctor%2A?displayProperty=nameWithType> constructor.
]]></format>
</remarks>
<altmember cref="T:System.Web.Routing.Route" />
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/cc668201(v=vs.100)">ASP.NET Routing</related>
<related type="Article" href="https://msdn.microsoft.com/library/200fe812-d0a6-4531-b9b4-cfc4ee83a678">How to: Define Routes for Web Forms Applications</related>
<related type="Article" href="https://learn.microsoft.com/previous-versions/dd329551(v=vs.140)">Walkthrough: Using ASP.NET Routing in a Web Forms Application</related>
</Docs>
</Member>
</Members>
</Type>