最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net core - 500 error reaching api endpoint when body object contains a property of System.Net.Mail.Attachment after upgradin

programmeradmin1浏览0评论

We upgraded our Web APIs from .NET 7 to .NET 8 recently, and now any of our endpoints that accept classes containing attachment properties (System.Net.Mail.Attachment) are unreachable. It doesn't matter if the property is a single Attachment type or a collection of attachments.

All we get now when trying to call those endpoints are 500 server errors, even when using swagger or postman. I tried to take a closer look at what might be going on, but the breakpoint within the controller method doesn't even get hit, and the console logs provide no help other than 500 server error.

I created branches right before the upgrade and right after and confirmed it is due to the 8 upgrade.

Does anyone have any idea as to what might be causing this? I tried to look if it was as simple as needing to upgrade references, but those are all latest.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论