hey-hoho / ScheduleMasterCore

This is a distributed task management system base on .Net Core platform .
Apache License 2.0
853 stars 245 forks source link

第一个任务启动成功,其他的都失败了,ERROR:Unable to cast object of type 'generatedProxy_2 to type 'CompanyService.CompanyServiceSoap'. #68

Closed fgb1990 closed 2 years ago

fgb1990 commented 2 years ago

第一个任务启动成功,其他的都失败了,ERROR:Unable to cast object of type 'generatedProxy_2 to type 'CompanyService.CompanyServiceSoap'.

因为定时任务里有webservice引用,所以把PluginLoadContext 的isCollectible 设置为了false

现在的问题就是,第一个任务启动成功了,其他的任务在运行的时候都会报错(所有任务都在一个压缩包里面)

堆栈错误: at Hos.ScheduleMaster.Base.TaskBase.InnerRun(TaskContext context) in D:\WorkSpace\任务调度系统ScheduleMasterCore\ScheduleMasterCore\src\ScheduleMasterCore\Hos.ScheduleMaster.Base\TaskBase.cs:line 68 at Hos.ScheduleMaster.Base.TaskContext.InstanceRun() in D:\WorkSpace\任务调度系统ScheduleMasterCore\ScheduleMasterCore\src\ScheduleMasterCore\Hos.ScheduleMaster.Base\TaskContext.cs:line 75 at Hos.ScheduleMaster.QuartzHost.RunnableJob.AssemblyJob.OnExecuting(TaskContext context) in D:\WorkSpace\任务调度系统ScheduleMasterCore\ScheduleMasterCore\src\ScheduleMasterCore\Hos.ScheduleMaster.QuartzHost\RunnableJob\AssemblyJob.cs:line 22 at Hos.ScheduleMaster.QuartzHost.Common.RootJob.InnerRun(IJobExecutionContext context) in D:\WorkSpace\任务调度系统ScheduleMasterCore\ScheduleMasterCore\src\ScheduleMasterCore\Hos.ScheduleMaster.QuartzHost\Common\RootJob.cs:line 69

hey-hoho commented 2 years ago

这个问题应该是和你前一个问题相同的原因,你可以尝试自己升级到.NET5或者.NET6看有没有修复这个问题

fgb1990 commented 2 years ago

好的,我用webapi,代替webservice了,谢谢

发自我的小米手机 在 HOHO @.***>,2021年12月7日 下午2:31写道:

这个问题应该是和你前一个问题相同的原因,你可以尝试自己升级到.NET5或者.NET6看有没有修复这个问题

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/hey-hoho/ScheduleMasterCore/issues/68#issuecomment-987613235, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFJ4QYJZ5XGDZWBED4Z7RR3UPWS5XANCNFSM5I2E4KOQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.