internal override IAsyncResult BeginExecuteUrl(
                                        String url, String method, String childHeaders,
                                        bool sendHeaders,
                                        bool addUserIndo, IntPtr token, String name, String authType,
                                        byte[] entity,
                                        AsyncCallback cb, Object state) {

        if (_ecb == IntPtr.Zero ||              // after done with session
            _asyncResultOfExecuteUrl != null || // another ExecuteUrl in progress
            (sendHeaders && HeadersSent()))     // asked to send headers, but already sent them
        {
            throw new InvalidOperationException(SR.GetString(SR.Cannot_execute_url_in_this_context));
        }

        if (entity != null && entity.Length > 0) {
            int ret = UnsafeNativeMethods.EcbGetExecUrlEntityInfo(entity.Length, entity, out _entity);
            if (ret != 1) {
                throw new HttpException(SR.GetString(SR.Failed_to_execute_url));
            }
        }

        Debug.Trace("ExecuteUrl", "ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl: url=\"" + url + "\".");


        HttpAsyncResult ar = new HttpAsyncResult(cb, state);
        _asyncResultOfExecuteUrl = ar;

        _executeUrlCompletionCallback = new ISAPIAsyncCompletionCallback(OnExecuteUrlCompletion);
        _rootedThis = GCHandle.Alloc(this); // root for the duration of ExecuteUrl

        int rc;
        try {
            ar.MarkCallToBeginMethodStarted();
            rc = UnsafeNativeMethods.EcbExecuteUrlUnicode(_ecb,
                                        url, method, childHeaders,
                                        sendHeaders,
                                        addUserIndo, token, name, authType,
                                        _entity,
                                        _executeUrlCompletionCallback);
        }
        finally {
            ar.MarkCallToBeginMethodCompleted();
        }

        if (rc != 1) {
            if (_entity != IntPtr.Zero) {
                UnsafeNativeMethods.EcbFreeExecUrlEntityInfo(_entity);
            }
            _rootedThis.Free();
            _asyncResultOfExecuteUrl = null;

            Debug.Trace("ExecuteUrl", "ISAPIWorkerRequestInProcForIIS6.BeginExecuteUrl: failed!");

            throw new HttpException(SR.GetString(SR.Failed_to_execute_url));
        }

        if (sendHeaders) {
            // ExecuteUrl will send headers, worker request should not
            _headersSentFromExecuteUrl = true;
        }

        return ar;
    }