# question

## MVC.net application throwing "Could not create SSL/TLS secure channel"

I have one simple MVC.net (Not core) application that further connects to my Astra instance and fetches data from the database. However, while creating a connection to Astra it gives me "Could not create SSL/TLS secure channel" error. I created one simple console application and deploy it at some location and it's working fine. also, the same MVC.net application working fine in my dev machine's IIS.

Based on my understanding I am missing something in my cloud machine. I am struggling to figure out this issue. if anyone have faced similar kind of issue please help me here

1 comment

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

·

This is a FOLLOW UP QUESTION from ASF Cassandra Slack channel. Question asked by Joao R is as follows,

Hi I'm assuming you're on .NET so I'm going to ask a couple of questions to try and help
• are you using the C# driver? what version?
• when you say "MVC" are you referring to the old ASP .NET or the new ASP .NET Core? Which version of .NET Framework/.NET Core are you using?
0 Likes 0 ·

It's not clear to me whether the applications you've deployed on locally or on-premise (or wherever) is also connecting to your Astra DB cluster so I'm going to provide an answer which you might have already accounted for.

When connecting to Astra, you will need to download the secure-connect bundle for the DB you're connecting to. The secure-connect bundle contains the SSL/TLS certificates, hostnames for the contact list and CQL port specific to your database.

In your app, you need to make a call to .WithCloudSecureConnectionBundle() to include the path to your secure-connect bundle. For example:

 var session =
Cluster.Builder()
.WithCloudSecureConnectionBundle(@"C:\path\to\secure-connect-communitydb.zip")
.WithCredentials("erick", "SomeCom9lexPass#ord")
.Build()
.Connect();