Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IServiceProxyAdministration interface

Administrative support for creating and connecting proxies to remote service applications.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public interface IServiceProxyAdministration

In this example, SampleWebServiceProxy inherits from SPIisWebServiceProxy and implements the IServiceProxyAdministration interface.

    using Microsoft.SharePoint.Administration;

    [Guid("470DC8EA-77FB-4623-87F7-3237E2B21B02")]
    [SupportedServiceApplication("1D14CB15-2DB1-4395-B187-70355C829630", "1.0.0.0", typeof(SampleWebServiceApplicationProxy))]
    internal sealed class SampleWebServiceProxy : SPIisWebServiceProxy, IServiceProxyAdministration
    {

Implement IServiceProxyAdministration to support connections to service applications in remote farms using the "Connect" button on the ribbon on the Service Application Management page.

IServiceProxyAdministration requires the GetProxyTypes, GetProxyDescription and CreateProxy methods to be implemented.


        #region IServiceProxyAdministration Members
        public Type[] GetProxyTypes()
        {
            return new Type[] { typeof(SampleWebServiceApplicationProxy) };
        }
        public SPPersistedTypeDescription GetProxyTypeDescription(
            Type serviceApplicationProxyType)
        {
            return new SPPersistedTypeDescription(
                "Sample Web Service Proxy",
                "Connects to the Sample Web Service.");
        }
        public SPServiceApplicationProxy CreateProxy(
            Type serviceApplicationProxyType,
            string name,
            Uri serviceApplicationUri,
            SPServiceProvisioningContext provisioningContext)
        {
            // Create a proxy for the specified (typically remote) service application
            return new SampleWebServiceApplicationProxy(
                name,
                this,
                serviceApplicationUri);
        }
        #endregion

Show:
© 2015 Microsoft