2

We have a legacy Web Forms application which we've recently converted from a website project to a web application project.

The Web Forms project is the "startup" project of the solution.

There is an MVC project which is a reference to the Web Forms project.

In the MVC project, there are several view (cshtml) files that are set as "Embedded Resource". When the application is debugged locally in visual studio, these files are found and compiled and the pages are visible.

When the Web Forms project is published (locally), I get an error that says "The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:" etc

The question is how come this works on IIS Express but not on IIS 10? Is there some config settings I can update to make this work?

Divyang Desai
  • 7,483
  • 13
  • 50
  • 76
Ryan Penfold
  • 752
  • 2
  • 11
  • 16
  • I think you have to copy the views to the server also... – ViRuSTriNiTy Nov 07 '16 at 14:59
  • I think you may ask to published web application project. This error simply means, application tries to find out view of index but not able to find. so make sure error located path having views – Divyang Desai Nov 07 '16 at 17:06
  • The relative path being used in referencing the views might be the suspect. [possible duplicate](http://stackoverflow.com/questions/18273416/the-view-or-its-master-was-not-found-or-no-view-engine-supports-the-searched-loc) – rollo Nov 07 '16 at 17:33

1 Answers1

0

Do you have a Virtual Path Provider in the WebForms project?

Try installing my project 'EmbeddedResourceVirtualPathProvider'

Install-Package EmbeddedResourceVirtualPathProvider

https://github.com/mcintyre321/EmbeddedResourceVirtualPathProvider/

mcintyre321
  • 12,996
  • 8
  • 66
  • 103