Query.SafeQueryPropertiesTemplateUrl property

SharePoint 2013

Specifies the location of the QueryProperties template. This property must be specified when issuing a query by a user who does not have UseRemoteAPIs() permission enabled. If the query will not run without UseRemoteAPIs() permission enabled, you can set the IgnoreSafeQueryPropertiesTemplateUrl property to true instead.

Namespace:  Microsoft.Office.Server.Search.Query
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Public Property SafeQueryPropertiesTemplateUrl As String
Dim instance As Query
Dim value As String

value = instance.SafeQueryPropertiesTemplateUrl

instance.SafeQueryPropertiesTemplateUrl = value

Property value

Type: System.String

By default, UseRemoteAPIs() is not granted to anonymous users.

The specified URL must use scheme "webpart" or "file". The host should be "webroot". For "webpart" URLs, the path must be web-relative path of the page on which the Web Part is placed. The query string of the URL must contain the key "id" with a value that contains a Web Part ID. For example: webpart://webroot/Pages/results.aspx?id=4. For "file" URLs, the path must be web-relative path of the file which contains the serialized QueryProperties template.