I also had exactly the same issue, using ServiceStack version 4.5.6
Here is my code for registration
container.RegisterAutoWiredAs<EventConditionalLoadingRepository, IEventConditionalLoadingRepository>()
.ReusedWithin(ReuseScope.Request);
container.RegisterAutoWiredAs<MetaRiskRepository, IMetaRiskRepository>()
.ReusedWithin(ReuseScope.Request);
container.RegisterAutoWiredAs<RiskStoreConnectivityService, IRiskStoreConnectivityService>()
.ReusedWithin(ReuseScope.Request);
container.Register<IUnitOfWork>(c =>
{
return new UnitOfWork();
}).ReusedWithin(ReuseScope.Request);
container.Register(c => (IUnitOfWorkEnlistable)c.Resolve<IUnitOfWork>())
.ReusedWithin(ReuseScope.Request);
And here is my service that takes these dependencies
public AnalysisServiceStackService(
IEventConditionalLoadingRepository eventConditionalLoadingRepository,
IMetaRiskRepository metaRiskRepository,
IUnitOfWork unitOfWork)
{
_eventConditionalLoadingRepository = eventConditionalLoadingRepository;
_metaRiskRepository = metaRiskRepository;
_unitOfWork = unitOfWork;
_log.Information("AnalysisServiceStackService constructed");
}
You can see that I have a log statement there, which when I hit this service up via postman for sequential requests, I get this sort of thing logged
2017-03-30 15:34:10 [Information] AnalysisServiceStackService constructed
2017-03-30 15:34:11 [Information] AnalysisServiceStackService constructed
2017-03-30 15:34:12 [Information] AnalysisServiceStackService constructed
2017-03-30 15:34:13 [Information] AnalysisServiceStackService constructed
2017-03-30 15:34:14 [Information] AnalysisServiceStackService constructed
2017-03-30 15:34:15 [Information] AnalysisServiceStackService constructed
2017-03-30 15:34:16 [Information] AnalysisServiceStackService constructed
2017-03-30 15:34:17 [Information] AnalysisServiceStackService constructed
So I know the service itself should be attempting to resolve a new PerRequest instance of the IOC components it needs.
If I then use Visual studio and use the Debug "Make Object ID" feature to check what the IOC container is giving me they are the same instance.
Call 1 : 1st Request
see the #1 Object ID created by Visual Studio

Call 2 : 2nd Request
See the #1 Object ID which means its the same instance it should NOT be. It should be a new instance for a new request

And just to prove that these are different calls, here is the logs for the Constructor being run twice, once for each request

Only thing that fixed this for me was the suggested fix of Reuse.None
But if I have to do that I might as well just use the AutoFac adapter (which I would prefer to use anyway) and use the standard AutoFac INstancePerLifeTimeScope : http://docs.autofac.org/en/latest/lifetime/instance-scope.html#instance-per-lifetime-scope
Any ideas?