Closed weng271190436 closed 5 years ago
This is a known issue that is still open.
I thought that version 5.10.2 is supposed to work around this problem? My simple repro is using 5.10.2 but it still hits this problem.
5.10.1 has workaround
Closing as duplicate of #40
@ENikS Indeed, using 5.10.1, you can no longer repro this issue but if you are using version 5.10.1 together with any version of Unity.Interception ASP.NetCore website fails starting. I mean of course to the usage of .UseUnityServiceProvider(). Is this also a known issue?
In the end I managed troubleshooting this downgrading Unity.Interception to 5.10.0
If I use Unity as my default DI container (by UseUnityServiceProvider()) and I call Url.Link() in a controller action twice, it is going to say: System.ObjectDisposedException: 'Cannot access a disposed object. Object name: 'IServiceProvider'.'
I have a simple repro here: https://github.com/weng271190436/unityrepro/blob/master/WebApplication1/Controllers/ValuesController.cs
Start the .NET Core 2.2 web application. If you hit localhost:5001/api/values for the first time, you will get a response. If you hit that url the second time, you will see the ObjectDisposedException error.