How to build a Web-Service

Riesebos, WJ 0 Reputation points
2025-10-02T06:15:08.81+00:00

How to build a Web-Service?

I've got an old project of a Web-Service that does not compile anymore.

What are the best practices now?

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

1 answer

Sort by: Most helpful
  1. Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 810 Reputation points Microsoft External Staff
    2025-10-22T13:01:40.73+00:00

    Thanks for reaching out!

    1. Determine which technology or framework your old web service was built with (e.g., ASP.NET Web API, WCF, SOAP). This will guide your next steps.
    2. ASP.NET Core is the most recent and recommended framework for building web services. If your old service is using an outdated framework, consider migrating to ASP.NET Core for better performance and support.
    3. Use Dependency Injection: Modern frameworks include built-in support for dependency injection, which can help manage service dependencies more effectively.
    4. For a simple REST API, start with a project in Visual Studio using the ASP.NET Web API template. You can follow the documentation for basic setups.
    5. For local testing, you can use the Development Server in Visual Studio. For production, consider hosting on Azure App Services.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.