# ArchivePasswordException

An encrypted archive member could not be opened: no password was supplied, or the supplied password does not open it.

Class 

`OfficeIMO.Archives`

**Namespace**

`OfficeIMO.Archives`

**Assembly**

`OfficeIMO.Archives`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[ArchivePasswordException.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Archives/ArchivePasswordException.cs#L14)

**Base**

`IOException`

**Implements**

`ISerializable`

**Modifiers**

sealed

An encrypted archive member could not be opened: no password was supplied, or the supplied password does not open it.

## Inheritance

- IOException
- ArchivePasswordException

## Remarks

Derives from IOException, like [ArchiveCorruptionException](/api/archives/officeimo-archives-archivecorruptionexception/). Traditional ZipCrypto carries only a one-byte password check, so a wrong password can also surface after decoding, as a checksum mismatch; that case is reported here too, because it cannot be told apart from a damaged member.

Filter members 

Show inherited

## Constructors

ArchivePasswordException 2 overloads

`public ArchivePasswordException(string entryName, bool passwordSupplied, string message)` [#](#constructor-ctor-string-boolean-string)

[ArchivePasswordException.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Archives/ArchivePasswordException.cs#L14)

Creates the exception for entryName.

Parameters

**entryName string required**

The member name as stored in the archive.

**passwordSupplied bool required**

Whether a password was supplied.

**message string required**

The error message.

`public ArchivePasswordException(string entryName, bool passwordSupplied, string message, Exception? innerException)` [#](#constructor-ctor-string-boolean-string-exception)

[ArchivePasswordException.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Archives/ArchivePasswordException.cs#L23)

Creates the exception with the error that caused it.

Parameters

**entryName string required**

The member name as stored in the archive.

**passwordSupplied bool required**

Whether a password was supplied.

**message string required**

The error message.

**innerException System.Exception? required**

The error that caused this one, or null.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual Exception GetBaseException()` [#](#method-getbaseexception)

Inherited from Exception

Returns

`Exception`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public virtual void GetObjectData(SerializationInfo info, StreamingContext context)` [#](#method-getobjectdata-serializationinfo-streamingcontext)

Inherited from Exception

`Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")` `EditorBrowsable(1)`

Parameters

**info SerializationInfo required**

**context StreamingContext required**

`public Type GetType()` [#](#method-gettype)

Inherited from Exception

Returns

`Type`

`public override string ToString()` [#](#method-tostring)

Inherited from Exception

Returns

`string`

## Properties

`public string EntryName { get; }` [#](#property-entryname)

[ArchivePasswordException.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Archives/ArchivePasswordException.cs#L29)

The member name as stored in the archive.

`public bool PasswordSupplied { get; }` [#](#property-passwordsupplied)

[ArchivePasswordException.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Archives/ArchivePasswordException.cs#L32)

True when a password was supplied but does not open the member; false when none was supplied.

## Inherited Properties

`public MethodBase? TargetSite { get; }` [#](#property-targetsite)

Inherited from Exception

`public virtual string Message { get; }` [#](#property-message)

Inherited from Exception

`public virtual IDictionary Data { get; }` [#](#property-data)

Inherited from Exception

`public Exception? InnerException { get; }` [#](#property-innerexception)

Inherited from Exception

`public virtual string? HelpLink { get; set; }` [#](#property-helplink)

Inherited from Exception

`public virtual string? Source { get; set; }` [#](#property-source)

Inherited from Exception

`public int HResult { get; set; }` [#](#property-hresult)

Inherited from Exception

`public virtual string? StackTrace { get; }` [#](#property-stacktrace)

Inherited from Exception

<!-- PowerForge markdown artifact sha256:A0B2119E145E4CEE554C252DFDB9A1068456642DB660131B00FB391A0B797904 -->
