SoapHeaderAttribute.Required 屬性

定義

警告

This property will be removed from a future version. The presence of a particular header in a SOAP message is no longer enforced

這個成員已經過時,而且不具功能。

C#
[System.Obsolete("This property will be removed from a future version. The presence of a particular header in a SOAP message is no longer enforced", false)]
public bool Required { get; set; }

屬性值

Boolean 值。

屬性

備註

若要確認 SOAP 標頭已傳送至 XML Web 服務,請確認 屬性中指定的 MemberName 成員為 nullnull如果是 ,則不會傳送 SOAP 標頭。

在 .NET Framework SDK 1.0 版中 Required ,屬性會指出收件者 XML Web 服務或 XML Web 服務用戶端是否必須瞭解及處理 SOAP 標頭。 如果收件者未處理 SOAP 標頭,則會擲回例外狀況。

適用於

產品 版本 (已淘汰)
.NET Framework (1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)