Create an Exe with Form from WebApi

gerd74

New member
Joined
May 17, 2023
Messages
3
Programming Experience
10+
Hi everyone, I'm new to VB.net. I tried to program a WebApi to see how and if it works. I am very satisfied with the result. It works very well. But now I noticed that the result of the compilation is a DLL. When trying to switch the project from class library to Windows forms, I am unable to place a call on the sub main that starts the WebApi. Can anyone help me here? Thanks very much
 
Last edited:
A Web API and a Windows Forms application are two very different things. What are you actually trying to accomplish? Do you want a Web API, a WinForms app or both? If you want both then you need two different projects. If you already have a Web API and you actually want a WinForms app then you need to create a new project and transfer the appropriate code from one to the other. Please explain clearly what you're actually trying to accomplish.
 
Hi, thanks for your reply. I want to have an exe that starts the IIS for the webapi. The webapi is a dll by default. Sorry, i expressed myself wrong.
 
That still doesn't really make sense. IIS is running all the time and, if you add the API to IIS ten it will generally be running all the time too. Your client app then just makes a call to the an endpoint in that API.
 
At the Moment when I start my app within the the IDE, it starts an IIS-Express and at this time I can make a call to my webapi. This behaviour is what I want to compress in a startable exe.
 
Back
Top