見つかりませんでした。Asp.netコアは:ビューのインデックスは、「Asp.netコア</p> <p>3のアプリを、フロントエンド、(同じ敷地内)APIおよびログイン、IIS 8.5でアプリケーションを展開
3人すべてがVS2015からIIS Expressで完全に動作しています。
フロントエンド(HTMLのみ/ AngularJS)& APIは、IIS 8.5
しかし、ログイン(IdentityServer4)のために完璧に取り組んでいる:
InvalidOperationException: The view 'Index' was not found. The following locations were searched:
- ~/UI/Home/Views/Index.cshtml
- ~/UI/SharedViews/Index.cshtml
私は '〜/' が参照する理解その約束。
マイVS2015構造:テスト済み/チェック:
- .UseContentRoot(Directory.GetCurrentDirectory())のProgram.csに
- すべての権限IIS_IUSRSユーザーアカウントにサーバー上
CustomViewLocationExpander:
public class CustomViewLocationExpander : IViewLocationExpander { public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context, IEnumerable<string> viewLocations){ yield return "~/UI/{1}/Views/{0}.cshtml"; yield return "~/UI/SharedViews/{0}.cshtml"; } public void PopulateValues(ViewLocationExpanderContext context) { } }
私は自由に 'wwwrootに' のみJS /画像/ CSSのすべてのコンテンツにアクセスすることができます
私はこの1つ上の無知です。
ビューを展開したかどうか確認しましたか?あなたのproject.jsonの様子を共有できますか? –
project.jsonのpublishOptions要素に「wwwroot」以外の「UI」フォルダを追加するのを忘れました – DavidT