We have build a plugin to Episerver where we put views, js and css in the ~/modules/MyPlugin/ and it works just fine local and on a normal server. But when we deploy to Azure we get this problem:
[InvalidOperationException: The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
The view are locates here: ~/modules/MyPlugin/ContentTranslationHistory/Index.cshtml
But MVC does not find it in Azure. Works perfect on all other environments. Any ideas?
Are you sure the view file are actually deployed to Azure?You could verify using KUDU.If build action is set to something different than Content, that could be the reason.
Unfortuantly I cannot access the Azure environment since it is a customers, but I will tip them about KUDU.
Azure should reach the ~/modules without problem right? I'm pretty sure they are not there.
I will get back to you on this, thanks!
In the meantime, you could check the build action for the view in Visual Studio.
I think you have configure the Route for this. You can refer below blog posts-
@Ravindra, I have a feeling that inproperly configured modules should blow up in local environment as well..
Yes, You are correct. Then it seems like some files are missing on the server.
It is very clear from the error that files are missing. Because, in case of access issue the error will not show the searched locaions.
I have strong feeling about that :) AS you are saying that it's working in other environments.
So it was exactlly as I suspected and as you all said in this thread. The developer had installed the Nuget package but not inlcuded the files in their solution and therefor they where not included in the package and not copied to the Azure environment.
Thanks for you help and input!