HttpRequestValidationException Konstruktorer

Definition

Överbelastad. Skapar en ny instans av HttpRequestValidationException klassen.

Överlagringar

Name Description
HttpRequestValidationException()

Skapar en ny instans av HttpRequestValidationException klassen.

HttpRequestValidationException(String)

Skapar ett nytt HttpRequestValidationException undantag med det angivna felmeddelandet.

HttpRequestValidationException(String, Exception)

Initierar en ny instans av HttpRequestValidationException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till undantaget.

HttpRequestValidationException()

Skapar en ny instans av HttpRequestValidationException klassen.

public:
 HttpRequestValidationException();
public HttpRequestValidationException();
Public Sub New ()

Gäller för

HttpRequestValidationException(String)

Skapar ett nytt HttpRequestValidationException undantag med det angivna felmeddelandet.

public:
 HttpRequestValidationException(System::String ^ message);
public HttpRequestValidationException(string message);
new System.Web.HttpRequestValidationException : string -> System.Web.HttpRequestValidationException
Public Sub New (message As String)

Parametrar

message
String

En sträng som beskriver felet.

Kommentarer

Innehållet i parametern message är avsett att vara läsbart för människor. Konstruktorns HttpRequestValidationException(String) anropare krävs för att säkerställa att strängen message har lokaliserats.

Gäller för

HttpRequestValidationException(String, Exception)

Initierar en ny instans av HttpRequestValidationException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till undantaget.

public:
 HttpRequestValidationException(System::String ^ message, Exception ^ innerException);
public HttpRequestValidationException(string message, Exception innerException);
new System.Web.HttpRequestValidationException : string * Exception -> System.Web.HttpRequestValidationException
Public Sub New (message As String, innerException As Exception)

Parametrar

message
String

Ett felmeddelande som förklarar orsaken till undantaget.

innerException
Exception

Undantaget som är orsaken till det aktuella undantaget. Om den här parametern inte nullär genereras det aktuella undantaget i ett catch block som hanterar det inre undantaget.

Kommentarer

Ett undantag som genereras som ett direkt resultat av ett tidigare undantag bör innehålla en referens till det tidigare undantaget i InnerException egenskapen. Egenskapen InnerException returnerar samma värde som skickas till HttpRequestValidationException(String, Exception) konstruktorn, eller null om InnerException egenskapen inte anger det inre undantagsvärdet till HttpRequestValidationException(String, Exception) konstruktorn.

Gäller för