1

ローカルで正常に動作するIdentity Server 4を使用するasp.netコアMVCアプリケーションがあります。配備されたasp.netコアmvc​​アプリケーションがazureでブラウズできない

  • アクセス静的ファイル:しかし、私はAzureのアプリケーションサービスにそれを展開するときにアプリが

    私はできが期待通りに動作しない(展開が自動的に行わチェックインありませんので、マニュアルの手順に基づいています) WWWのルートディレクトリの外に

  • アクセスはJSONが
を返さ/ openidのコンフィギュレーションを.well知られていると見

私はできません:

    ホームページへ
  • 参照し、
  • アイデンティティサーバーのウェルカムページを取得するビュー任意のMVC「ページ」(e..g /アカウント/ログイン)

私のconfigureメソッドは、特に複雑ではありません。

loggerFactory.AddConsole(); 

      if (env.IsDevelopment()) 
      { 
       app.UseDeveloperExceptionPage(); 
      } 

      app.UseIdentityServer(); 
      app.UseCookieAuthentication(new CookieAuthenticationOptions 
      { 
       AuthenticationScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme, 
       AutomaticAuthenticate = false, 
       AutomaticChallenge = false 
      }); 



      app.UseStaticFiles(); 

      app.UseMvc(routes => 
      { 
       routes.MapRoute(
        name: "default", 
        template: "{controller=Home}/{action=Index}/{id?}"); 
      }); 

しかし、MVC側では何も機能していないようです。私はホームページを参照するとき、私は単にビューが見つかりません取得:project.jsonファイルで

An unhandled exception occurred while processing the request. 
InvalidOperationException: The view 'Index' was not found. The following locations were searched: 
/Views/Home/Index.cshtml 
/Views/Shared/Index.cshtml 

答えて

4

チェックpublishOptionsセクション - あなたがサブセクションincludeのセクションがあります。ここでは、「Views」フォルダへの相対パスを追加する必要があります。

{ 
    "publishOptions": { 
    "include": [ 
     "wwwroot", 
     "Views", 
     ... 
    ] 
    }, 
} 
+0

ワウ。私はそのセクションが存在することさえ知りませんでした。どのように/それがViewsフォルダなしで作成されるのでしょうか?私は今wwwroot/Views/areas/appsettings/web.configとその作業に追加しました。ありがとう:) – LDJ

関連する問題