the error log we found likes:
2019-08-16 15:59:29.8488|13|ERROR|Microsoft.AspNetCore.Server.Kestrel|Connection id "0HLLSQC4VN2IG", Request id "0HLLSQC4VN2IG:00000001": An unhandled exception was thrown by the application. System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at Aliyun.Acs.Core.Utils.CacheTimeHelper.AddLastClearTimePerProduct(String product, String regionId, DateTime lastClearTime)
at Aliyun.Acs.Core.Profile.DefaultProfile.AddEndpoint(String endpointName, String regionId, String product, String domain, Boolean isNeverExpire)
at YYB.Api.Common.Controllers.SmsController.Send(String templateId, String phoneNumber, String templateParams) in E:\develop\server\yyb-api-common\YYB.Api.Common\YYB.Api.Common\Controllers\SmsController.cs:line 62
I called the api in the controller's action like :
IClientProfile profile = DefaultProfile.GetProfile(Config.RegionId, Config.AccessKeyId, Config.AccessKeySecret); DefaultProfile.AddEndpoint(Config.EndPointName, Config.RegionId, Config.Product, Config.Domain);
the error log we found likes: 2019-08-16 15:59:29.8488|13|ERROR|Microsoft.AspNetCore.Server.Kestrel|Connection id "0HLLSQC4VN2IG", Request id "0HLLSQC4VN2IG:00000001": An unhandled exception was thrown by the application. System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct. at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) at Aliyun.Acs.Core.Utils.CacheTimeHelper.AddLastClearTimePerProduct(String product, String regionId, DateTime lastClearTime) at Aliyun.Acs.Core.Profile.DefaultProfile.AddEndpoint(String endpointName, String regionId, String product, String domain, Boolean isNeverExpire) at YYB.Api.Common.Controllers.SmsController.Send(String templateId, String phoneNumber, String templateParams) in E:\develop\server\yyb-api-common\YYB.Api.Common\YYB.Api.Common\Controllers\SmsController.cs:line 62
I called the api in the controller's action like :
IClientProfile profile = DefaultProfile.GetProfile(Config.RegionId, Config.AccessKeyId, Config.AccessKeySecret); DefaultProfile.AddEndpoint(Config.EndPointName, Config.RegionId, Config.Product, Config.Domain);