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
applicationRelativePath
Type: System.Stringrelative path
restrictions
Type: Microsoft.TeamFoundation.Framework.Server.RequestRestrictionsrequest restrictions
exactPathMatchOnly
Type: System.Booleantrue 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.