Self hosting ReportServer with owin

The report server would be a very usefull addition for my customers.



It would be great to self host the report server as an owin middleware.



Use OWIN to Self-Host ASP.NET Web API - ASP.NET 4.x | Microsoft Learn



Here is a greate start on how to write a middleware How to write OWIN middleware in 5 different steps - Ben Foster


I already use an self hosted owin instance (multiple instances) per customer and the requirement would be to have a seperated report server for every instances without having to install the report server on a dedicated server.



Preferable this would be a nuget package that provides the dependencies to have a running report server up in 5 minutes.



Here is some sample code how I could imagine the startup code.



I included a ListLabelFactory configuration property that could be responsible of constructing the List&Label instance which is used by report server internally. This way I could register designer functions and objects for the report server.



 

    public class Program
    {
        static void Main(string[] args)
        {
            string url = "http://localhost:8080";
            using (WebApp.Start(url))
            {
               Console.WriteLine("Server running on {0}", url);
               Console.ReadLine();
            }
       }
    }
    
    class Startup   
    {
        public void Configuration(IAppBuilder app)
        {
            var config = new ReportServerConfig
            {
                BasePath ="/combitReportServer",
                ProviderName:="...",
                ConnectionString:="...",
                ListLabelFactory = new MyListLabelFactory(),
            };
            app.UseReportServer(config);
        }
     }