Base solution for your next web application
Open Closed

Windows Service #11896


User avatar
0
devoyard created

Dears ,

we need to call the Application services from windows services project (.net core)

what are the needed stesp to do that ,

Regards, Ahmad


1 Answer(s)
  • User Avatar
    0
    marble68 created

    You can make a console application that hits your API, then move it to a class.

    Do that first. There's a plethora of examples out there.

    Consider testing your calls with postman.

    Then, create a windows service project, add your class to it.

    Have your windows service perform the processes.

    This may of value to you: https://learn.microsoft.com/en-us/dotnet/core/extensions/windows-service

    There are a multitude of windows service projects out there you can check to create your own.

    If you have swagger enabled -> this may be of distinct value to you: https://stackoverflow.com/questions/54094688/generate-net-client-from-swagger

    You can put your credentials in the service's configuration file - but if you don't have direct control of where you install it, you may want to consider another strategy.