We deliver an ASP.NET MVC application built with Sitecore to a client who deploys an application to install on multiple Sitecore sites / tenants.
We are actively using ServiceStack, as in most of our projects, but have encountered a problem now. Another application in Sitecore setup also uses ServiceStack. This causes an error:
[InvalidDataException: AppHostBase.Instance has already been set]
This is really great, because all the files for all the applications in the Sitecore installation are in the same physical folder on the disk. This means that we share the DLL and that’s it.
So, this other project is initialized before ours, and when we try to register our services, we get the above error.
Is there any way around this? Can I somehow register my services on an existing one AppHostBase.Instance?
Two things worth noting:
source
share