# DistributedApplicationException

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/DistributedApplicationException.cs)
- Inherits: `Exception`

Represents an exception that is thrown when a distributed application error occurs.

## Definition

```csharp
namespace Aspire.Hosting;

public class DistributedApplicationException
    : System.Exception
{
    // ...
}
```

## Constructors

- [DistributedApplicationException](/reference/api/csharp/aspire.hosting/distributedapplicationexception/constructors.md#constructor) -- Initializes a new instance of the [DistributedApplicationException](/reference/api/csharp/aspire.hosting/distributedapplicationexception.md) class. This represents an exception that is thrown when a distributed application error occurs.
- [DistributedApplicationException(string)](/reference/api/csharp/aspire.hosting/distributedapplicationexception/constructors.md#constructor-string) -- Initializes a new instance of the [DistributedApplicationException](/reference/api/csharp/aspire.hosting/distributedapplicationexception.md) class, given the `message`. This represents an exception that is thrown when a distributed application error occurs.
- [DistributedApplicationException(string, Exception)](/reference/api/csharp/aspire.hosting/distributedapplicationexception/constructors.md#constructor-string-exception) -- Initializes a new instance of the [DistributedApplicationException](/reference/api/csharp/aspire.hosting/distributedapplicationexception.md) class, given the `message` and `inner` exception. This represents an exception that is thrown when a distributed application error occurs.
