Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6760997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:07:56+00:00 2026-05-26T14:07:56+00:00

I found that the proxy generated with SlSvcUtil.exe (or by adding reference to Web

  • 0

I found that the proxy generated with SlSvcUtil.exe (or by adding reference to Web References) only supports Event based async model which is absolutely inappropriate from design point of view (events were 2nd class citizens from the first days).

I’m going to implement F#’s async builder approach and I found “old style” Begin/End are much easier to be generalized. I notices SlSvcUtil.exe generates Begin/End methods pair but marks them both with private keyword?

A couple options on top of my head are:

  • expose Begin/End methods by updating the proxy class by hand
  • use wsdl.exe and create wrapper library for missing System.Web classes
  • use other communication protocols (HttpClient, Tcp)
  • use third-party proxies (failed to find any so far)

Any ideas?

Say someone created a remote service with one method:

public interface CompressService
{
    public byte[] Compress(byte[] inData);
}

After SlSvcUtil I got:

public class CompressServiceSoapClient: ClientBase<CompressServiceSoap...
{
    private BeginOperationDelegate onBeginCompressDelegate;
    private EndOperationDelegate onEndCompressDelegate;
    public event System.EventHandler<CompressCompletedEventArgs> CompressCompleted;
    public void CompressAsync(byte[] inData, object userState);
}

While in fact I need:

public class CompressServiceSoapClient: ClientBase<CompressServiceSoap...
{
    public IAsyncResult BeginCompress(byte[] inData, System.AsyncCallback callback, object asyncState);
    public byte[] EndCompress(IAsyncResult result);
}

Answer

The solution is to declare contract interface with async methods and do not use generated code inherited from ClientBase<>. The article http://msdn.microsoft.com/en-us/library/dd744834(v=vs.95).aspx describes this in more details.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:07:57+00:00Added an answer on May 26, 2026 at 2:07 pm

    You can access the begin/end methods by using the channel factory for the end point.

    Basically just create a new ChannelFactory and pass in a binding and end point. You can use the host source to dynamically update the end point so it’s not hard-coded. The resulting instance will expose the begin/end methods for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found that Wix v3 uses a tool (heat.exe) to harvest information into WiX
I am looking for a DBI (or similar) proxy that supports both SQL restrictions
I have web application that is behind a proxy. If the user has logged
Adding a service reference to a web service (this is all WCF) in Visual
I found that SO put the search input inside a form tag, and i
I found that using Smarty with PHP, sometimes extra time will need to be
I found that I have to perform a swap in python and I write
I found that this C++ code: vector<int> a; a.push_back(1); a.push_back(2); vector<int>::iterator it = a.begin();
I found that I can set a tooltip on a QLineEdit as such: equation
I found that some result of MBRContains(g1,g2) and other functions seems not right to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.