หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
| Value | |
|---|---|
| Rule ID | ASP0019 |
| Category | Usage |
| Fix is breaking or non-breaking | Non-breaking |
Cause
IDictionary.Add isn't recommended for setting or appending headers. IDictionary.Add throws an ArgumentException when attempting to add a duplicate key.
Rule description
IDictionary.Add isn't recommended for setting or appending headers.
How to fix violations
To fix a violation of this rule, use IHeaderDictionary.Append or the indexer to append or set headers.
When to suppress warnings
Do not suppress a warning from this rule.
ASP.NET Core