c# - 迁移到 Windows Server 2016 后的问题
问题描述
我正在进行从 microsoft server 2008 R2 到 microsoft server 2016 的服务器迁移。后台有一个独立的服务器来管理要在 SAS 上运行的作业。我们使用 ConcurrentDictionary 来记录作业信息。该代码在旧服务器上完美运行,但在新服务器上,作业信息从 ConcurrentDictionary 中消失。
ConcurrentDictionary 在回调函数 OnProgress 和 Oncomplete 中更新。我试图调试代码,但它不会在这两个函数中遇到断点。如果我将这些函数公开并在主 api 中添加引用,则回调无法正常工作。接下来我打算尝试使用 xml 文件而不是 ConcurrentDictionary 来存储作业信息。但我更愿意在对代码进行重大更改之前查看其他选项。
OnProgress -
private void OnProgress(Messages.JobFeedback feedback)
{
operations.AddOrUpdate(feedback.JobId,
new SasJobsServiceOperation { Feedback = feedback },
(id, o) => { o.Feedback = feedback; return o; });
}
已完成 -
private void OnCompleted(Messages.JobFeedback feedback, string xmlResult)
{
operations.AddOrUpdate(feedback.JobId,
new SasJobsServiceOperation { Feedback = feedback, XmlResult = xmlResult },
(id, o) => { o.Feedback = feedback; o.XmlResult = xmlResult; return o; });
}
调用函数 -
this.callback.OnProgress(new Messages.JobFeedback
{
JobId = this.settings.Id,
PercentComplete = 1,
FeedbackMessage = "Starting Job on server",
Status = Messages.StatusCode.Running
});
解决方案
这个问题解决了。服务器功能中禁用了“http 激活”。启用它可以使函数调用正常工作。
推荐阅读
- android - 使用 MediaCodec、Media Extractor 和 Media Muxer 在 Android 上进行视频修剪
- r - 导入多个 Excel 工作簿,每个工作簿都包含 R 中的多个工作表
- symfony4 - 使用 VichUploaderBundle 通过 API 上传文件
- terraform - terraform aws-provider 每次尝试“1 添加,1 更改,1 销毁”
- c++ - std::to_chars 在 MacOS / clang 上编译但不链接
- python-3.x - Raspberry Pi 3 B+ (Buster) 无法控制 Dynamixel AX-12A 与 Raspberry Pi 3 B+ (Buster) 与半双工通信
- r - R中Excel的BETADIST()等价函数
- python - SqlAlchemy 使用 Join 查询两个类
- python - 使用 waitress 作为 Flask 的生产服务器
- python - 如何使用python将行插入csv文件