,它可以在這裏找到:http://documentation.mailgun.net/user_manual.html#events-webhooks,尋找「傳遞的事件網絡掛接」MVC4 Mailgun交付網絡掛接
我無法引用Request.Params [」 Message-Id「],除非我修改應用程序的requestValidationMode爲2.0
當我嘗試引用這個字段沒有requestValidationMode = 2.0時,我得到了潛在的不安全錯誤。該字段的內容是:< [email protected]>。我也試圖聲明一個模型來利用自動模型綁定。我的模型如下所示:
public class MailgunDeliveredEvent
{
public string Id { get; set; }
public string Event { get; set; }
public string Recipient { get; set; }
public string Domain { get; set; }
[AllowHtml]
[JsonProperty(PropertyName="Message-Id")]
public object MessageId { get; set; }
public int Timestamp { get; set; }
public string Token { get; set; }
public string Signature { get; set; }
}
當我嘗試引用MessageId字段時,它將返回null。我試圖添加
[Bind(Exclude="message-headers")]
由於我對該領域不感興趣, 在Controller中,我給自己定
[ValidateInput(false)]
我似乎無法得到的消息-ID字段後面。任何幫助?