Try our conversational search powered by Generative AI!

Accessing the ~/modules folder in Azure

Vote:
 

Hi!

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:
~/Views/ContentTranslationHistory/Index.cshtml
~/Views/ContentTranslationHistory/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
~/Views/ContentTranslationHistory/Index.aspx
~/Views/ContentTranslationHistory/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/modules/MyPlugin/ContentTranslationHistory/Index.cshtml]

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?

Thanks!

/Kristoffer

#207745
Oct 01, 2019 16:09
Vote:
 

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.

#207746
Edited, Oct 01, 2019 16:23
Vote:
 

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!

/Kristoffer

#207747
Edited, Oct 01, 2019 16:27
Vote:
 

In the meantime, you could check the build action for the view in Visual Studio.

#207748
Oct 01, 2019 16:30
Vote:
 

@Ravindra, I have a feeling that inproperly configured modules should blow up in local environment as well..

#207754
Oct 01, 2019 18:23
Vote:
 

Yes, You are correct. Then it seems like some files are missing on the server.

#207764
Oct 02, 2019 12:24
Vote:
 

Hi Kristoffer,

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.

#207835
Oct 05, 2019 7:02
Vote:
 

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!

/Kristoffer

#208114
Oct 14, 2019 15:25
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.