Click or drag to resize
UrlHelperPreviewExtensionsAuthenticateUrl Method (UrlHelperExtensionPoint, String)
Extends the given url by additional authentication information when the current request carries authentication information in the request URL.

Namespace: Kentico.Content.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
public static IHtmlContentProxy AuthenticateUrl(
	this UrlHelperExtensionPoint instance,
	string url
)

Parameters

instance
Type: Kentico.Web.MvcUrlHelperExtensionPoint
The object that provides methods to build URLs to Kentico content.
url
Type: SystemString
URL that is to be authenticated. The following URL formats will be authenticated: Relative (virtual) or absolute path. Query string parameters are not secured and can be changed even after the url is authenticated.

Return Value

Type: IHtmlContentProxy
If the current request carries authentication information in the URL, returns the given url extended by authentication information. If the current request does not carry authentication information in the URL, returns the original url.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type UrlHelperExtensionPoint. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptioninstance is null.
ArgumentExceptionurl is null or empty.
Remarks
The return type of IHtmlContentProxy indicates that the return value should not be HTML encoded, otherwise it may loose its query string parameters due to encoded '&' character
See Also