Exemplo n.º 1
0
        //=============================================================================================
        // The demand is not added now (in 4.5), to avoid a breaking change. To be considered in the next version.

        /*
         * [PermissionSet(SecurityAction.Demand, Unrestricted = true)] // because we call code from a non-APTCA assembly; WSATs are not supported in partial trust, so customers should not be broken by this demand
         */
        ActivationProxy CreateActivationProxy(EndpointAddress address)
        {
            CoordinationService coordination = GetCoordinationService();

            try
            {
                return(coordination.CreateActivationProxy(address, false));
            }
            catch (CreateChannelFailureException e)
            {
                DiagnosticUtility.TraceHandledException(e, TraceEventType.Error);
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                          new TransactionException(SR.GetString(SR.WsatProxyCreationFailed), e));
            }
        }
        private ActivationProxy CreateActivationProxy(EndpointAddress address)
        {
            ActivationProxy     proxy;
            CoordinationService coordinationService = this.GetCoordinationService();

            try
            {
                proxy = coordinationService.CreateActivationProxy(address, false);
            }
            catch (CreateChannelFailureException exception)
            {
                DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Error);
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new TransactionException(System.ServiceModel.SR.GetString("WsatProxyCreationFailed"), exception));
            }
            return(proxy);
        }