providerName="System.Data.EntityClient" にしているのに System.ArgumentException: 'Keyword not supported: 'metadata'.' が出る話
providerName="System.Data.EntityClient" にしているのに System.ArgumentException: 'Keyword not supported: 'metadata'.' が出る話
ASP.NET MVC で Entity Framework な Web アプリを Azure App Service に載せたら System.ArgumentException: 'Keyword not supported: 'metadata'.' が出て動かない.
接続文字列の providerName="System.Data.SqlClient" を providerName="System.Data.EntityClient" にすれば OK という記事がググるといっぱい出てくるが既になっている.
何故? 何故?
答え: Azure ポータルで、Azure App Service のアプリケーション設定の接続文字列を設定するとき、種類に SQL Azure を選んでいた.
Azure SQL Database を使うからとよく考えずにこれを選んでいたが、ここは providerName 相当の設定箇所であり、SQL Azure を選んだことにより System.Data.SqlClient 相当で上書きされてしまっていた. Entity Framework を使うときは、ここは Custom を選ぶのが正解.
Author And Source
この問題について(providerName="System.Data.EntityClient" にしているのに System.ArgumentException: 'Keyword not supported: 'metadata'.' が出る話), 我々は、より多くの情報をここで見つけました https://qiita.com/c-yan/items/4b9090df202aad0eebca著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .