1
I have a project working but with the dependency of IIS.
In some researches I found the possibility of making the project self host. As in the link: http://www.macoratti.net/18/05/net_conc3.htm
But examples only point to Console App-like projects (.NET Framework). In which one of the steps is to add a code snippet in the Main() method of the Program class However, in a Web Application ASP.NET (.NET Framework) project there is no such class.
How to proceed in this case? or it is not possible to publish an ASP.NET Web Application (.NET Framework) without IIS dependency?
How so without dependence?
– novic
To publish an ASP.NET Web Application (.NET Framework) you need to publish through IIS. A similar application however in (.NET Core) is possible to publish in self host mode, for example: if you publish to folder. an exe is created and when running it a hosting service is created allowing the operation of the web application without the need for IIS. If you look at the link I mentioned You’ll see an alternative to (.Net Framework) only for Console App projects, my case is the ASP.NET Web App
– Jonas Centenaro
The only way to create a Self-hosted web application is to be an executable (for example it shows as an app console). Very basic: if it is not an executable, there is no way you can make it run...
– Jéf Bueno
Following the steps of the tutorial you presented, will end up with a
ConsoleApp
that will play the role of host of your application, just as IIS would. I think it’s valid to explain why you don’t want to use IIS, what constraints your environment and benefits you expect from this approach?– Leandro Angelo
Another option, if you do not want a console. You can follow the same recipe, but implement in Windows Service
– Leandro Angelo