Question

I was trying asp.net host with servicestack application. Here is link to my repo

Without servicestack global.asax.fs 's application start is getting called but it is not getting called with servvicestak installed. I have successfully made it work with V3.71 and also with self host. But asp.net host with servicestack V4 it is breaking even before getting into application start. And error is coming that instance of AppHost is not created, so servicestack could not start. That is also making difficult to debug it.

Please have a look and at least provide a way to start debugging. Or a something I can start with to look into.

Please let me know if any further detail is required.

Était-ce utile?

La solution

Just had a closer look at the source code, it's missing an ignore() statement and the end of Application_Start because the method is expected to return void (and apphost.Init() in v4 returns a ServiceStackHost so it can be chained), e.g:

type Global() = 
    inherit System.Web.HttpApplication()
    member x.Application_Start (sender:Object, e:EventArgs) = 
        let apphost = new App_Start.AppHost()
        apphost.Init() 
        ignore()
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top