2017-01-12 21 views
2

私は最初のASP.Core MVCアプリケーションで作業しています。ASP.NETコアMVCアプリケーションでSQL Serverバックエンドを使用して接続文字列を指定する正しい方法は何ですかSQL認証が必要ですか?ASP.Core MVCのユーザ名とパスワードで接続文字列を設定

ArgumentExceptionが:キーワードはサポートされていません: 'ユーザーID' の下に\

私はそれが

{ 
    "ApplicationInsights": { 
    "InstrumentationKey": "" 
    }, 
    "ConnectionStrings": { 
     "DefaultConnection": "Server=myserver;Database=mydatabase;userid=id;password=mypwd" 
    }, 
    "Logging": { 
     "IncludeScopes": false, 
     "LogLevel": { 
     "Default": "Debug", 
     "System": "Information", 
     "Microsoft": "Information" 
     } 
    } 
    } 

答えて

8
user<space>id 
エラーをスローしてアプリケーションを実行file.When私appsettings.jsonです

サーバー= myServerAddress;データベース= myDataBase;ユーザーID = myUsername; パスワード= myPassword。

https://www.connectionstrings.com/sql-server/

0

あなたはUser ID代わりのuseridを試すことはできますか?主な違いは、ケースがweb.configファイルに接続文字列で統合security = falseを設定することにより

0

問題ではないし、このエラーが

に解決される、 useridとの間の空間にある

注意

関連する問題