Create a method called EnsureConnectionStatus() that does this:

```
if (_conn.State != ConnectionState.Disconnected)
{
    throw new InvalidOperationException(Resources.Error_HeadersCanOnlyBeSetWhenDisconnected); 
}
```