偶尔抛出异常,原因不明,抛出异常的位置:JsonNetReturnAttribute; System.ObjectDisposedException: Cannot access a disposed object. #247
Labels
等待反馈(needs feedback)
这意味着需要来自发起者的反馈(This means that feedback from the author is required)
包的版本:
"WebApiClientCore" Version="2.0.4"
"WebApiClientCore.Extensions.NewtonsoftJson" Version="2.0.4"
"WebApiClientCore.Extensions.OAuths" Version="2.0.4"
代码定义:
[ServiceName("baseDataServer", "ut")]
[apiConsoleLog]
[JsonNetReturn]
public interface iCommTestApi
{
}
现象:
偶尔会抛出异常
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at WebApiClientCore.Attributes.JsonNetReturnAttribute.SetResultAsync(ApiResponseContext context)
at WebApiClientCore.Attributes.ApiReturnAttribute.OnResponseAsync(ApiResponseContext context)
at WebApiClientCore.Implementations.ApiRequestExecuter.HandleResponseAsync(ApiResponseContext context)
The text was updated successfully, but these errors were encountered: