# Connection failed with .Net app

**URL:** <https://community.neo4j.com/t/connection-failed-with-net-app/59739>\
**Category:** Drivers & Stacks\
**Tags:** migrated\
**Created:** [August 7, 2022, 4:59pm UTC](https://community.neo4j.com/t/connection-failed-with-net-app/59739 "2022-08-07T16:59:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OmarHamdy](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/omarhamdy/32/27572_2.png) [@OmarHamdy](https://community.neo4j.com/u/OmarHamdy)\
**Post date:** [August 7, 2022, 4:59pm UTC](https://community.neo4j.com/t/connection-failed-with-net-app/59739/1 "2022-08-07T16:59:31Z")

</div>

I am implementing the example in Neo4j .NET course and I got this exception here

public static async Task InitDriverAsync(string uri, string username, string password)  
{  
\_driver = GraphDatabase.Driver(uri, AuthTokens.Basic(username, password));  
await \_driver.VerifyConnectivityAsync();  
}

Neo4j.Driver.ServiceUnavailableException: 'Connection with the server breaks due to IOException: Failed to connect to server 'bolt://3.235.19.104:7687/' via IP addresses'[3.235.19.104]' at port '7687'. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0.'

appsettings.json

"AllowedHosts": "\*",  
"Jwt": {  
"secret": "SuperSecureSecret"  
},  
"Neo4j": {  
"uri": "bolt://3.235.19.104:7687",  
"username": "neo4j",  
"password": "solution-bomb-crosses"  
},  
"Password": {  
"rounds": "10"  
}

---

<div class="post-metadata">

**Author:** ![michael.hunger](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/michael.hunger/32/27377_2.png) [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Post date:** [August 9, 2022, 1:24pm UTC](https://community.neo4j.com/t/connection-failed-with-net-app/59739/2 "2022-08-09T13:24:20Z")

</div>

But your sandbox database is still running and you can access it e.g. via Neo4j browser?

---

<div class="post-metadata">

**Author:** ![OmarHamdy](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/omarhamdy/32/27572_2.png) [@OmarHamdy](https://community.neo4j.com/u/OmarHamdy)\
**Post date:** [August 9, 2022, 2:19pm UTC](https://community.neo4j.com/t/connection-failed-with-net-app/59739/3 "2022-08-09T14:19:11Z")

</div>

Yes  
(migrated from khoros post [Re: Connection failed with .Net app - Neo4j - 58791](https://community.neo4j.com/t5/drivers-stacks/connection-failed-with-net-app/m-p/58877#M4884))
