4Manuals

  • PDF Cloud HOME

构造函数中的SmtpResponse异常 Download

    找不到MSExchange自动发现服务

我正在将垃圾邮件过滤器从Exchange 2013更新到2019。我的传输代理引用了这两个DLL:

Microsoft.Exchange.Data.Common.dll
Microsoft.Exchange.Data.Transport.dll

当我用Exchange 2019中的新DLL替换这些DLL的2013版本时,以下两行代码都会生成异常:

// Exchange 2019 syntax
SmtpResponse smtpResponse = SmtpResponse.Create("550", "5.7.1", "A single string");


// Exchange 2013 syntax (deprecated under 2019, but still compiles)
SmtpResponse smtpResponse = new SmtpResponse("550", "5.7.1", "A single string");

异常消息为: “ Microsoft.Exchange.Data.Transport.Smtp.SmtpResponse的类型错误。” …的类型初始值设定项已生成异常。

即使这行简单的代码也会导致异常:

SmtpResponse smtpResponse = new SmtpResponse();

有什么想法为什么SmtpResponse的构造方法会抛出此异常?在Exchange 2013上,此代码已完美运行了多年。

0 个答案:

没有答案



Similar searches
    无法通过Selenium在Chrome浏览器中使用Tor 用列表列表遮盖两列(Pandas df) Samsung SR-43NXB Refrigerator User Manual discord.js声明或声明预期的问题 如何安全地从您的wordpress网站上删除cloudflare?