0

We have an ASP.NET web service which is currently hosted on IIS. It acts as a client and as a server. The project is using .Net 4.6.1 framework. We want to abandon SOAP and use gRPC protocol, but IIS doesn't support HTTP2, so we can't create a server out of it.

I have found an answer here that suggests that we make our application a windows service using Topshelf. Will this basically mean that we are writing our own hosting service? The application in question has a configuration in Global.asax which should be ran on application start, so it gets configured properly. It is using Autofac for dependency injections. Will we be able to run the Global.asax methods Application_Start and Application_End if we use Topshelf?

Riki
  • 342
  • 1
  • 19
  • 1
    Your application is .Net Framework Asp.net, and not Asp.Net core, right ? The answer you are linking to is Asp.Net Core. You can't run a .Net framework asp.net application as a windows service. – MikNiller Dec 06 '19 at 10:52
  • The link is about .NET Core and even that is no longer necessary in .NET Core 3.0. You could always [create Windows Service application](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer) in .NET Framework. You should *really, really, really* consider moving to .NET Core 3 though - that's the version with the full and ongoing gRPC and Worker/Service support. .NET Old 4.6 may or may not work and it's up to *you* to fix problems if it doesn't – Panagiotis Kanavos Dec 06 '19 at 10:53
  • @MikNiller you could always create and deploy Windows services in .NET Framework, going back to 2002 and .NET 1.0 – Panagiotis Kanavos Dec 06 '19 at 10:54
  • @PanagiotisKanavos I've created my fair share of windows services with or without Topshelf. Read my comment again, it is about running a ASP.NET application as a windows service. – MikNiller Dec 06 '19 at 10:56
  • Thank you very much guys. We will consider moving the project to .NET Core 3. – Riki Dec 06 '19 at 11:12

0 Answers0