0

I have tried connecting my webapp database to the azure cloud server using a connectionstring (provided by azure) from the web.config. But theres always an error that says "Format of the initialization string does not conform to specification starting at index 0."

Anyone encountered this error before? Please help.

connection string below :

<add name="SQLAzureConnection"
        connectionString="Server=tcp:mnftprvzdk.database.windows.net,1433;Database=mydb;User ID=user;Password=pass;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;"
        providerName="System.Data.SqlClient" />
4

1 回答 1

1

用户名应该是user@machinename,(没有完整的 DNS)。

所以在这种情况下user@mnftprvzdk

格式为:

Server=tcp:[serverName].database.windows.net;Database=myDataBase;
User ID=[LoginForDb]@[serverName];Password=myPassword;Trusted_Connection=False;Encrypt=True;
于 2012-10-17T08:19:51.137 回答