Do microsoft recommends to write .Net Windows service? or it is becoming mandatory to write windows service in C++ due to performance reasons

BHATT, ALOK 1 Reputation point
2021-08-24T06:53:57.177+00:00

What are the reason that one should stop writing windows service in .NET and migrate all .NET service back to C++?
Is this becoming a mandatory from microsoft to write windows service in .NET?
We are following HSA architecture, and our underlying windows service is written in C# i.e., C# windows service is deployed as Driver using HSA framework.
UWP apps communicate via RPC to C#.net service. ,
Are there any reason w.r.t performance of service that we should think of converting service to win32 windows service?
Any problem with high CPU usage, high memory footprint, uwp communication break as .net services are generally delayed started

C#
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.
10,309 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,126 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,276 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 56,931 Reputation points
    2021-08-25T01:46:12.123+00:00

    only if you have actual performance troubles or prefer C++

    0 comments No comments

  2. Limitless Technology 39,391 Reputation points
    2021-08-25T12:27:54.597+00:00

    Hello @BHATT, ALOK ,

    Thank you for your question.

    Types of Services

    There are two types of services you can create in Visual Studio using the .NET Framework. Services that are the only service in a process are assigned the type Win32OwnProcess. Services that share a process with another service are assigned the type Win32ShareProcess. You can retrieve the service type by querying the ServiceType property.

    You might occasionally see other service types if you query existing services that were not created in Visual Studio. For more information on these, see the ServiceType.

    For more information please go through this link:
    https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications#service-lifetime

    If the reply was helpful, please don't forget to upvote or accept as answer.

    Thanks,

    Bharti B

    0 comments No comments