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)


Public Sub SetRequestRestrictions ( _
    applicationRelativePath As String, _
    restrictions As RequestRestrictions, _
    exactPathMatchOnly As Boolean _
public void SetRequestRestrictions(
    string applicationRelativePath,
    RequestRestrictions restrictions,
    bool exactPathMatchOnly
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


  • exactPathMatchOnly
    Type: System.Boolean

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


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


TeamFoundationMetabase Class

SetRequestRestrictions Overload

Microsoft.TeamFoundation.Framework.Server Namespace