1
votes

I'm using .net backend for Azure mobile services. I've published the service on the cloud with the publishing profile downloaded from Azure portal.The service gets published successfully. But I'm unable to connect to the service with my windows phone client. I get 500 response from the service. The logs on the portal shows this error "Exception=System.InvalidOperationException: This operation requires a connection to the 'master' database. Unable to create a connection to the 'master' database because the original database connection has been opened and credentials have been removed from the connection string. Supply an unopened connection. ---> System.Data.SqlClient.SqlException: Login failed for user 'KqRUJJyDGlLogin'."

I'm using web.config transforms and in the Web.Release.config , the connectionstring with name , "MS_TableConnectionString" is pointing to the cloud db.

Is something that I'm missing over here.

Please help.

Thanks

1

1 Answers

0
votes

It seems to be a problem with droping and recreating the db. If you have something like this:

public class MyInitializer: DropCreateDatabaseIfModelChanges<MyContex>

in your WebApiConfig.cs change it to CreateDatabaseIfNotExists... If you want to change your model, manually drop the tables of your db. That might not be a perfect solution, but it works for me.