How to add Azure SQL Server connection string to app.config in Windows Forms?

Viewed 21059

I'm trying to add an Azure SQL Server connection string into my app.config file, but there are red underlines all over the connection string when I try to copy and paste it from Azure. I'm using Windows Forms in Visual Studio.

Here is my connection string:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <connectionStrings>
        <add name="AddSales"
             Server="tcp:Sales99.database.windows.net,1433;Initial" Catalog="Sales;Persist" Security="" Info="False;User" ID=""{your_username};Password=""{your_password};MultipleActiveResultSets=""False;Encrypt=""True;TrustServerCertificate="False;Connection" Timeout="30"
             providerName="System.Data.SqlClient" />
    </connectionStrings>
</configuration>

Is there a way to fix this issue? Please advise.

2 Answers
Related