質問

using sql server managment studio I can connect database using sever authentication with

    login = sa , password = 1

But I cant connect using server explorer (and from web app) in visual studio.

      <add name="DefaultConnection" connectionString="Server=localhost;Database=XXX.mdf;Integrated Security=False;User Id=sa;Password=1"
  providerName="System.Data.SqlClient" />

login failed for user sa

Can somebody answer this strange behavior?

I have 64bit Enterprize edition. Thanks.

役に立ちましたか?

解決

Database=XXX.mdf

Is your database actually called XXX.mdf? I suspect it isn't, since that looks like a file name, and is perhaps just called XXX instead. The login will fail if the database isn't correct, since the server isn't going to give information about the failure to an unauthenticated user. Try:

Database=XXX
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top