asp.net mvc - "Login failed for user '<user>'." when using DefaultConnection in MVC 5 on SQL Azure -


i'm publishing web application azure, has 2 database connection strings.

    <add name="defaultconnection" connectionstring="server=tcp:myserver.database.windows.net,1433;database=mydb;user id=myuser@myserver;password=mypassword;encrypt=true;trustservercertificate=false;connection timeout=30;" providername="system.data.sqlclient" />     <add name="myapp" connectionstring="server=tcp:myserver.database.windows.net,1433;database=mydb;user id=myuser@myserver;password=mypassword;encrypt=true;trustservercertificate=false;connection timeout=30;" providername="system.data.sqlclient" /> 

the myapp database connection working. entity framework uses provide site functionality. therefore, connection string valid.

however, defaultconnection database connection not work when running on azure platform, used asp.net mvc membership/authorization api. code boiler-plate/scaffold minimal modification. copied working connection string myapp , named defaultconnection. know defaultconnection because error occurs when trying log in, first time use connection string.

when running on azure, error:

login failed user 'myuser'. session has been assigned tracing id of 'dad6972c-2b65-4441-b09b-7994de11a47d'. provide tracing id customer support when need assistance.

to clarify, defaultconnection works fine locally, but not when published azure. here tests:

  • the identical connections work fine running locally using locally hosted database/server.
  • the identical connections work fine running locally accessing sql azure database. user "good".
  • the username/password correct, change them when running above scenario, error mentioned
  • i've copied/pasted connection strings azure portal no difference (obviously changing password placeholders)
  • but when deploy application accessing sql azure database (known work locally) , execute code on azure web apps, fails error mentioned.
  • i've ruled out transformation errors checking transforms , removing transformation logic entirely , "hardcoding" connection strings, publishing logic not interfering.

i'm @ total loss. i've tried modifying options on connection string, eg. trusting certificates, etc., no luck. if can connect locally remote sql azure database, why not when running on azure itself?

there connection strings section under configuration settings azure website check credentials there correct.i had gone through once..that time password there wrong though password @ web-config file correct


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -