共用方式為


DataServiceConfiguration.UseVerboseErrors 屬性

取得或設定資料服務是否應該傳回詳細資訊錯誤。

命名空間:  System.Data.Services
組件:  Microsoft.Data.Services (在 Microsoft.Data.Services.dll 中)

語法

'宣告
Public Property UseVerboseErrors As Boolean
    Get
    Set
'用途
Dim instance As DataServiceConfiguration
Dim value As Boolean

value = instance.UseVerboseErrors

instance.UseVerboseErrors = value
public bool UseVerboseErrors { get; set; }
public:
virtual property bool UseVerboseErrors {
    bool get () sealed;
    void set (bool value) sealed;
}
abstract UseVerboseErrors : bool with get, set
override UseVerboseErrors : bool with get, set
final function get UseVerboseErrors () : boolean
final function set UseVerboseErrors (value : boolean)

屬性值

型別:System.Boolean
如果資料服務應該傳回詳細資訊錯誤,則為 true,否則為 false。

實作

IDataServiceConfiguration.UseVerboseErrors

備註

UseVerboseErrors 屬性會設定整個服務的預設詳細資訊錯誤行為。 根據 DataService<T> 類別上 HandleException 方法引數的 UseVerboseErrors 屬性值,個別回應可能具有不同的行為。

為了安全考量,詳細資訊錯誤只應該在開發期間啟用,不應該在實際執行環境中啟用。

請參閱

參考

DataServiceConfiguration 類別

System.Data.Services 命名空間

其他資源

設定資料服務 (WCF Data Services)