XmlFormView.DataConnectionBaseUrl Property

Gets or sets the base URL that will replace the specified substring of the service URL for all relative Web services in the form.

Namespace:  Microsoft.Office.InfoPath.Server.Controls
Assembly:  Microsoft.Office.InfoPath.Server (in Microsoft.Office.InfoPath.Server.dll)

public Uri DataConnectionBaseUrl { get; set; }

Property Value

Type: System.Uri

Form templates containing Web service data connections can be modified to enable relative Web service URLs in place of the absolute Web service URLs used when the data connection is established in design mode. It requires modification of the manifest.xsf file of the form template in order to replace the xsf2:connectoid element with the xsf2:relativeQuery element, as in the example below. The replace attribute specifies the substring of the URL to replace at form initialization with the value set by the DataConnectionBaseUrl property.

<xsf2:webServiceAdapterExt ref="ExampleWebService" trackDataSetChanges="no">
    <xsf2:relativeQuery replace="http://ServerName/sites/SiteName" />


  • If the relativeQuery element does not exist in the manifest extension for the adapter, the full serviceURL specified in the manifest will be used.

  • If DataConnectionBaseUrl is null or empty, the full serviceURL specified in the manifest will be used.

  • The DataConnectionBaseUrl must be a valid URL.

  • An error will occur if the webServiceAdapterExt element contains both the xsf2:connectoid and the xsf2:relativeQuery elements.

  • The DataConnectionBaseUrl property applies to all Web service data connections in the form.

Community Additions