Deployed App on IIS 8.5, Asp.net core
3 apps, Front-end, API and Login (on the same site);
All 3 are working PERFECTLY in IIS express from VS2015;
The front-end (only html/AngularJS) & API are working perfectly on IIS 8.5
But for the Login (IdentityServer4):
InvalidOperationException: The view 'Index' was not found. The following locations were searched:
- ~/UI/Home/Views/Index.cshtml
- ~/UI/SharedViews/Index.cshtml
I understand that '~/' refers to the approot;
My VS2015 structure:
Tested/Checked:
- .UseContentRoot(Directory.GetCurrentDirectory()) in Program.cs
- All privileges to IIS_IUSRS user account on the server
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) { } }
I can access all content freely on 'wwwroot' only js/images/css
I'm clueless on this one.