The Configure method in the Startup class is used to specify how the Web application responds to HTTP requests.



Open the Startup.cs in the root of the ASP.NET Core Web application project.


The HTTP handler needs to be added to the Configure method of the Startup class.


app.Map("/Ventura.FSPRO", z => z.UseMiddleware<VenturaServer.FrameStreamProcessor>());


This mapping will redirect the path http://server:port/Ventura.FSPRO to the FrameStreamProcessor class.


For example:


   public class Startup

   {

       public void ConfigureServices(IServiceCollection services)

       {

       }


       private string _connection_string = "Server=........";


       public void Configure(IApplicationBuilder app, IHostingEnvironment env)

       {

           VenturaServerConfig.RequestHandler = () => new CustomRequestHandler();


           VenturaConfig.DefaultConnector = new AdoConnector(SqlClientFactory.Instance, _connection_string);


           if (env.IsDevelopment()) app.UseDeveloperExceptionPage();


           app.Map("/Ventura.FSPRO", z => z.UseMiddleware<VenturaServer.FrameStreamProcessor>());

       }


   }