---
title: "Class CouldNotContactSitecoreLayoutServiceClientException"
slug: "sitecore.layoutservice.client.exceptions.couldnotcontactsitecorelayoutserviceclientexception"
abstract: ""
---
# Class CouldNotContactSitecoreLayoutServiceClientException

Details an exception that may occur when the Sitecore layout service cannot be contacted.

## Inheritance

System.Object

[SitecoreLayoutServiceClientException](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.exceptions.sitecorelayoutserviceclientexception.html)

CouldNotContactSitecoreLayoutServiceClientException

### **Namespace**: Sitecore.LayoutService.Client.Exceptions

#### **Assembly**: Sitecore.LayoutService.Client.Abstractions.dll

##### Syntax

```csharp
public class CouldNotContactSitecoreLayoutServiceClientException : SitecoreLayoutServiceClientException

```

### Constructors

#### CouldNotContactSitecoreLayoutServiceClientException()

Initializes a new instance of the [CouldNotContactSitecoreLayoutServiceClientException](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.exceptions.couldnotcontactsitecorelayoutserviceclientexception.html) class.

##### Declaration

```csharp
public CouldNotContactSitecoreLayoutServiceClientException()

```

#### CouldNotContactSitecoreLayoutServiceClientException(Exception)

Initializes a new instance of the [CouldNotContactSitecoreLayoutServiceClientException](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.exceptions.couldnotcontactsitecorelayoutserviceclientexception.html) class.

##### Declaration

```csharp
public CouldNotContactSitecoreLayoutServiceClientException(Exception innerException)

```

##### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.Exception | innerException | The inner exception to be wrapped. |

#### CouldNotContactSitecoreLayoutServiceClientException(String)

Initializes a new instance of the [CouldNotContactSitecoreLayoutServiceClientException](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.exceptions.couldnotcontactsitecorelayoutserviceclientexception.html) class.

##### Declaration

```csharp
public CouldNotContactSitecoreLayoutServiceClientException(string message)

```

##### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | message | The exception message. |

#### CouldNotContactSitecoreLayoutServiceClientException(String, Exception)

Initializes a new instance of the [CouldNotContactSitecoreLayoutServiceClientException](https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-asp-dot-net-rendering-sdk/sitecore.layoutservice.client.exceptions.couldnotcontactsitecorelayoutserviceclientexception.html) class.

##### Declaration

```csharp
public CouldNotContactSitecoreLayoutServiceClientException(string message, Exception innerException)

```

##### Parameters

| Type | Name | Description |
| --- | --- | --- |
| System.String | message | The exception message. |
| System.Exception | innerException | The inner exception to be wrapped. |
