📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How do you call a legacy SOAP or WCF service from a .NET 10 application, and what are the gotchas?

Intermediate Theory Intermediate

🎯 Key points

  • dotnet-svcutil or Connected Services adds System.ServiceModel.* NuGet packages
  • Configuration in code, no app.config
  • Generated operations are Task-based; await them, don't block with .Result
  • Close clients or reuse ChannelFactory<T>
  • Explicit timeouts and size quotas
  • Check security mode: transport security supported, WS-* message security only partly
  • Contract tests with recorded SOAP messages or a stub service

⏱ 30-second answer

Generate a proxy with dotnet-svcutil (or Connected Services in Visual Studio), which adds the System.ServiceModel.* packages. Gotchas: there is no app.config, so bindings and endpoints are set in code (or your own configuration); the generated operations are async (Task-returning), so call them with await rather than blocking; create and close clients properly (or reuse a ChannelFactory<T>) to avoid leaking connections; set message size limits and timeouts explicitly. Security needs checking up front: transport security (HTTPS, client certificates, Windows auth) is well supported, but WS- message security* on WSHttpBinding is only partly supported in the .NET client, so confirm the service's security mode and any WS-Security requirements. Test with recorded request/response pairs or a stub service so contract changes are caught in CI.

🔍 What the interviewer is checking

Checks practical knowledge of consuming SOAP from modern .NET

↩ Usually asked after

More in Legacy Technologies

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me