Marcus N

Marcus N

  • NA
  • 3
  • 484

ASP.NET Core Web API inside .NET application

Apr 16 2018 1:37 AM
Hello forum members, 
 
as a student I'm currently working on a student thesis. I write about REST APIs inside the .NET framework. I have quite some C# programming experience, but I am new to ASP.NET and all the web technologies. 
 
I have a software that is written in C# that offers different functionality for testing hardware. Since the only way to do some remoting with this software or to connect to it is to use WCF, I thought about implementing a REST API. 
 
The company I work for needs some simple features like starting a service from something like a tablet using a URL.
 
Since at the current point it's not clear what kind of device or App should communicate with our software and remote it, I thought a REST API approach would be the right thing. 
 
Now I have several questions that seem to be hard to research, since all information I've found is not applicable for my use case or is outdated. 
 
Is it possible to embed a ASP.NET Core Web Api in my .NET application that will host itself? I wanted to implement a feature that a user can simply change a setting in the settings window, and a Web API will start. The API should not be available the whole time the software is running.
 
I have achieved something similar using the Embedio package from Github, but I wanted to do something from scratch since I might need some additional features later on. 
https://github.com/unosquare/embedio 
 
Thanks to anyone contributing or answering here!
 
Cheers