What to do with ASMX and WCF services during a .NET 8 migration

Most WebForms and VB6-era systems expose SOAP somewhere. An ASMX file that a partner calls nightly. A WCF service that the warehouse scanner talks to. Nobody lists these in the project plan, and they are often the first thing to break a cutover.

This note covers what happens to them on .NET 8, and how we decide what to do with each one.

What .NET 8 does and does not have

ASMX web services (.asmx) are not supported on modern .NET. There is no package that hosts them. They have to be replaced or kept running on the old stack.

WCF is different. The WCF client libraries (the System.ServiceModel packages) run on .NET 8, so a new slice can call an existing SOAP service. The server side does not ship. The community-maintained CoreWCF project provides a server implementation for a large part of the WCF model, but not all of it. Check your bindings against its documentation before you promise anything.

So you have three options per endpoint: leave it where it is behind the routing shim, host it with CoreWCF, or replace it with a REST API.

Step 1: Inventory every endpoint

Search the repository and the IIS configuration, not only the solution you were handed.

Get-ChildItem -Recurse -Include *.asmx,*.svc | Select-Object FullName
Select-String -Path .\**\web.config -Pattern 'system.serviceModel','webServices'

Then read the IIS logs for 30 to 90 days and count requests per path. A .svc file with zero traffic is a deletion candidate. One with a single caller at 2 a.m. is a batch integration, and the caller is the person you need to talk to.

For each endpoint, write down:

  • The caller, and whether you can change them.
  • The binding: basicHttpBinding, wsHttpBinding, netTcpBinding, named pipes.
  • Security: transport only, WS-Security, message-level certificates, or none.
  • Whether it uses sessions, duplex callbacks, or transactions.

The last two matter most. Duplex, transaction flow and some WS-* features are where a CoreWCF port stops being a port.

Step 2: Record the contract before you touch it

The WSDL describes the shape. It does not describe behavior. Capture both.

Save the WSDL for each service. Then record real request and response pairs from the logs or from a proxy in front of the service. Replay them against the old endpoint in an xUnit project and store the responses as approved output, the same way we do for pages in the golden-master harness.

Pay attention to the things a schema does not show:

  • SOAP fault content and fault codes for bad input.
  • Date and time zone handling in serialized values.
  • Empty element versus missing element versus xsi:nil.
  • Decimal rounding and string trimming.

Callers written ten years ago often depend on these accidents.

Step 3: Choose per endpoint

Keep it behind the shim. If the caller cannot change and the endpoint needs features CoreWCF lacks, leave it on the legacy host. Route it with the YARP shim and put it on the retirement list with a reason. This is a legitimate answer. It is not a failure.

Host it with CoreWCF. If the caller cannot change and the binding is a common one such as basicHttpBinding, port the service contract and implementation to CoreWCF. Keep the namespace, action names and fault contracts identical. Run the recorded pairs from Step 2 against the new host until they agree.

Replace it with REST. If you control the caller, or the caller is a team that is willing to move, build a documented HTTP API and retire the SOAP endpoint after a stated date. This is also the right shape if you plan to expose the module to agents, which we covered for MCP.

We do not recommend rewriting everything as REST by default. An unchanged SOAP contract with an external partner is cheaper to preserve than to renegotiate.

Step 4: Watch the clients too

WCF clients inside your own code are easy to forget. A generated proxy built against the .NET Framework configuration model reads its endpoints from web.config. On .NET 8 you configure the binding and address in code or in your own settings. Generate new clients with the dotnet-svcutil tool and test them against the old service from the first slice.

Also note that ASMX clients in VB6 or classic ASP often use the SOAP Toolkit or MSXML2.ServerXMLHTTP. Those keep working against a preserved endpoint. They will not work against a changed one unless someone edits that code.

Step 5: Cut over with a rollback

Route a small share of calls, or one named caller, to the new implementation. Compare responses against the old one using shadow traffic where the operation is read-only. Do not shadow operations with side effects without stubbing them first.

Keep the old endpoint deployed until you have seen a full business cycle, usually a month-end, with no differences.

What we would not do

We would not run an automated ASMX-to-anything conversion and trust the output. The generated code compiles, but it will not carry the fault and serialization behavior your callers depend on. Only the recorded pairs tell you that.

If you are not sure how many SOAP endpoints your system exposes, that count is a good first deliverable of a codebase assessment.