For an ASMX client based on .NET Framework's HttpWebClientProtocol, configure its public Proxy before the first network operation:

var service = new ReportsService();
service.Proxy = new WebProxy("http://proxy.example:8080")
{
    Credentials = proxyAccount
};

ReportsService is the generated class and proxyAccount comes from the deployment. SOAP service credentials are separate. This assignment does not need to be repeated inside every generated operation.

If the change concerns an underlying request option or instrumentation, use the legacy base's overridable GetWebRequest(Uri). Keep a matching partial declaration in a separate compiled file when the generated class is partial; otherwise an appropriate derived client can provide the override. Call the base implementation and preserve normal request construction.

That placement survives updating the web reference: regeneration can replace hand edits in Reference.cs, while separately maintained extensions remain reproducible.

Change only the request behavior actually required. Copying a KeepAlive workaround can affect connection reuse and authentication that depends on connection state.

This is the ASMX/.NET Framework model. WCF and other SOAP stacks have their own transport interfaces. Choose the supported client setting before introducing a custom extension.

Erthyglow kevrennek