This project is read-only.

Modules not working in hosting environment

Topics: Troubleshooting
Apr 11, 2012 at 4:10 AM

I've been trying to install modules in a hosted environment, everything seems fine during the install module process from gallery but once install finished the module functionality is not displayed (gallery page states it is enabled).

I have installed Orchard via WebMatrix on a local machine and the modules install and work as they should with no issues, I tried copying that site onto the hosted environment and again they dissapear.

Example is Email and ImageGallery which should show up in the admin menu but do not in hosted environment. I tried direct URL to where they should be but that comes up with page not found.

Does anyone know why this would be happening or what I can try to fix?

Apr 11, 2012 at 5:02 AM

Are you sure the versions of the modules you got are compatible with the version of Orchard you use? Do you see errors in app_data\logs?

Apr 11, 2012 at 5:17 AM

No errors in the log. I'm not 100% sure on modules compatibility but it does work on the local machine then when I upload to hosting environment it stops working.

I think I'll wipe it all tonight, reload to see if I get any better results.

Apr 11, 2012 at 5:49 AM

Well then it's your hosting environment that has something incompatible. Check for IIS integrated mode, trust level, app pool's ASP.NET 4.0 setting, etc.

Apr 11, 2012 at 11:33 PM

Thanks for the suggestions, I have not gone to the hosting company yet but when I tried changing to classic mode or different .net version locally the whole site broke so I'm presuming that would not be causing issues.

Afaik the servers are running Medium Trust which almost all hosting providers do so that should also not be causing issues.

Oh well, I'll continue to dig into it and see what I can find.


Apr 12, 2012 at 12:04 AM

This article might help you understand what's going on, it explains how Orchard loads modules.

You say there's nothing in the logs, but is it possible the file is locked & needs to be flushed?  Touching web.config will allow you to see any latest entries.  I was in a similar sounding situation to yours & getting "no suitable loader found for extension x" & reading the article above helped me work it out.  The "enabled" status on the modules page can be misleading -

Apr 12, 2012 at 12:17 AM

No, you *don't* want classic mode, you want integrated. Good hosting providers nowadays give you full trust. I would run from any hosting company that gives only medium trust.

Apr 16, 2012 at 12:48 AM

Thanks, looks like log files are not being created although should not be locked, touched the web.config with no luck. That article is quite helpful, explains a bit more about how it is working.

It could be full trust now, that info was old so I'll have to check with hosting, thanks for info though didn't realise most are now running full trust. Could that cause issues if it is running in medium trust?

Apr 16, 2012 at 12:54 AM

I have seen modules fail silently in medium trust if full trust is needed yes.  I think the idea is to not bring the whole site down which is great, but some logging would be good I guess :-)