以下の内容はhttps://odashinsuke.hatenablog.com/entry/2018/04/03/082553より取得しました。


メモ:ASP.NET Core + App Service の Application Settings

メモ

public static IWebHost BuildWebHost(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
                .UseApplicationInsights()
                .UseStartup<Startup>()
                .Build();
Configuration.GetConnectionString("DB");

appsettings.json

{
  "ApplicationInsights": {
    "InstrumentationKey": "xxxxxxxxxxxxxxxx"
  },
  "ConnectionStrings": {
    "DB": "xxxxxxxxxxxxxxxxxxxxx"
  }
}

って書いてるときの、App Service の Application Settings は、

  • Application settings
    • ApplicationInsights__InstrumentationKey
  • Connection strings
    • DB

でOK。

Connection strings は、環境変数に prefix 付くけど 「Configuration.GetConnectionString("DB");」で問題なく取れるらしい。
Working with Azure App Services Application Settings and Connection Strings in ASP.NET Core – cjAliaga Core
タイプ違いで複数同じ名称っていけるんやっけ?その場合はどうなるんやろ。




以上の内容はhttps://odashinsuke.hatenablog.com/entry/2018/04/03/082553より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14