Closed dtsob75 closed 2 years ago
Hi @dtsob75! Are these the code samples you are referring to? Can you also include what version of Sendgrid-csharp you are using?
@JenniferMah this example does not compile with .NET Core. Please advise on how to parse given a HttpRequest
from an API endpoint (not MVC)
Does this comment help? https://github.com/dotnet/aspnetcore/issues/3322#issuecomment-404560205
Closing due to inactivity. Please re-open this issue or open a new GitHub issue if you still need help.
I am attempting to implement the Inbound mail parser and I found the "Event Webhook C# Code Example" on the Sendgrid website. However, I am getting a couple of errors on the controller code. Specifically, in the following:
var root = _httpContextAccessor.HttpContext.Current.Server.MapPath("~/App_Data");
issues error: Request.Content.ReadAsMultipartAsync "HttpContext does not contain a definition for 'Current'"
And:
await Request.Content.ReadAsMultipartAsync(provider);
issues error: Request.Content.ReadAsMultipartAsync "HttpRequest does not contain a definition for 'Content'"
Our api is using ASP.Net Core 5.0. I assume there are some references missing, but I am not able to find out what they are.
I initially sent this issue to the SendGrid support, but they replied that I should contact this project....