Freigeben über


TeamFoundationMetabase.SetRequestRestrictions Method (String, RequestRestrictions, Boolean)

Set request restrictions for a given relative path.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Sub SetRequestRestrictions ( _
    applicationRelativePath As String, _
    restrictions As RequestRestrictions, _
    exactPathMatchOnly As Boolean _
)
public void SetRequestRestrictions(
    string applicationRelativePath,
    RequestRestrictions restrictions,
    bool exactPathMatchOnly
)
public:
void SetRequestRestrictions(
    String^ applicationRelativePath, 
    RequestRestrictions^ restrictions, 
    bool exactPathMatchOnly
)
member SetRequestRestrictions : 
        applicationRelativePath:string * 
        restrictions:RequestRestrictions * 
        exactPathMatchOnly:bool -> unit
public function SetRequestRestrictions(
    applicationRelativePath : String, 
    restrictions : RequestRestrictions, 
    exactPathMatchOnly : boolean
)

Parameters

  • exactPathMatchOnly
    Type: System.Boolean

    true to apply to this exact path only. false to apply recursively.

Remarks

The path matching is simple and exact (OrdinalIgnoreCase). If you're exactPathMatchOnly = true, hopefully you're granting more access (e.g. anonymous access), instead of trying to protect a particular resource. If you're trying to protect a particular resource, someone may be able to construct an equivalent URL that does not have the request restrictions you want.

.NET Framework Security

See Also

Reference

TeamFoundationMetabase Class

SetRequestRestrictions Overload

Microsoft.TeamFoundation.Framework.Server Namespace