0
 connectionString="Server=tcp:northwndtestserver,1433;Database  =HealthCureSystem;User   ID=bl;Password=mygyhcg89;Encrypt=True;TrustServerCertifi  cate=False;Connection Timeout=30"

"when i try to open a link that is linked with database an error occur System.ArgumentException: Keyword not supported: '*server'.You can see as http://tfstestz.azurewebsites.net/Diseases "

3
  • Where is your database located? Is it a Azure SQL database or on a VM? Commented Mar 17, 2016 at 5:51
  • At Azure SQL database Commented Mar 17, 2016 at 5:56
  • Can you paste your actual connection string? Instead of deleting the sensitive parts of the string can you just replace them with asterisks or something? The current obfuscation makes it harder to figure out what weirdness is from you removing sensitive stuff versus what you've actually done worng. For example, you've got some weird stuff like 'TrustServerCertifi cate' which just looks wrong Commented Mar 17, 2016 at 19:12

2 Answers 2

1

According to the error message, you have a "*" in front of the "Server" keyword in your connection string. I suspect the connection string you pasted in your question is not the same connection string that your web app is using.

Here is some example code which produces the exact same error message. Notice the "*" character that I added:

var connString = "*server=tcp:northwndtestserver,1433;Database=HealthCureSystem;User ID=bl;Password=mygyhcg89;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30"
var cn = new SqlConnection(connString);

And here is the error message, which matches yours:

System.ArgumentException: Keyword not supported: '*server'.
   at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
   at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
   at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
   at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
   at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
   at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
   at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
Sign up to request clarification or add additional context in comments.

Comments

0

If it is a Azure SQL database, then connection string typically should be Server=tcp:[serverName].database.windows.net,1433. Please try that.

You can Also go to the portal
Open Database-> Show Database connection strings and check there.
enter image description here

4 Comments

i have already used the same thing as you mentioned but an error occur of "Server" keyword.
ok the code that you have pasted above shows connectionString="Server=tcp:northwndtestserver,1433... and not Server=tcp:northwndtestserver.database.windows.net,1433, so I thought that was the problem
i omitted some code due to security. so this is not the problem.
<connectionStrings> <add name="HealthzDatabaseEntities" connectionString="Data Source=tcp:healthzdatabaseserver.database.windows.net,1433;Database=healthzdatabase;User ID=healthzadmin@healthzdatabaseserver;Password=*****;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" providerName="System.Data.EntityClient" /> </connectionStrings>

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.