Help! I screwed up!

Topics: Customizing Orchard, General, Writing modules
Feb 16, 2015 at 1:41 PM
I was surfing through the Gallery yesterday evening, and in a fit of stupidity, installed a Module on my live site without checking it out on my test site first. Now I can't access my live site! I'm getting the "The resource cannot be found" error and the site is completely down.

Holy. Sh*t!

How do I remove the module from the live site??? I'm running everything on Windows Azure, and unfortunately, I don't have a recent backup of the site. I know. Stupid.

Help, please! There must be a way to remove stuff remotely. But I can't even access the admin tools.

Heeeeeeelllllp!!!!!!
Developer
Feb 16, 2015 at 4:00 PM
You're in luck, because you can connect with FTP to your site and remove the module. Alternatively, you could enable Visual Studio Online, then connect to your site through Visual Studio Online and remove the module from there.
Feb 16, 2015 at 4:14 PM
Edited Feb 16, 2015 at 4:15 PM
@sfmskywalker - how do I connect through Visual Studio Online? I've got an account, but have never used it. I've dug through VSO, but can't seem to find a way to point it at my site on Azure.

And once I connect, how do I remove the module?
Developer
Feb 16, 2015 at 5:06 PM
When you are in the Azure portal on the settings page for your Azure Website, go to the Configure tab and enable the Edit in Visual Studio Online setting.
Once enabled, go back to the Dashboard page of your site and wait a bit until you see the Edit in Visual Studio Online link in the Quick Glance section on the right hand side of the screen.

Once you're in Visual Studio Online, it will show the directory structure of your site. Navigate to the Modules folder and delete the module folder that is causing trouble.
Feb 16, 2015 at 5:23 PM
Thanks for the walk-through. That got me to VSO. But even after doing what you suggested, I'm still getting the same error when I run the site.

I've been through a bunch of gyrations, and something weird is happening. A little background:

I have the main site and a backup. I do all of the dev work on the backup, which has a copy of the db, as well. I do all of my development locally, while connected to the test db. Then I publish to the test site, still connected to the test db. Once I'm satisfied everything is working correctly, I publish to the live site, where usually all of the db update scripts run properly, and everyone is happy.

Well, I decided to try to run the app through VS2013, while connected to the live db. It works. I take that to mean that something is broken in either the code or the cshtml on the site. However, if I republish everything, I still get an error.

This is baffling. And the site has now been down for over 18 hours.

Is there a way to remove all of the .cshtml and dlls from the site and publish fresh? Short of deleting and recreating the site in Azure, that is. That's really a last resort at this point.

Thanks again for your help. I can't believe I did something so stupid in the first place. Although I really wish Orchard were more robust in this regard. There need to be some safeguards in place that prevent rogue Modules from smoking an otherwise stable site. :-/
Feb 16, 2015 at 8:48 PM
Edited Feb 16, 2015 at 8:49 PM
It's like you didn't really delete your module folder as @sfmskywalker suggested. Did you completely stop your site before. Try to completely stop your site from the azure dashboard, and restart it... Try also to delete the App_Data/cache.dat file, try also to delete the App_Data/Dependencies folder...

But before, check if your module folder has been deleted

You can use an FTP client like FileZilla, you will need to input your "publishUrl", "userName" and your "userPWD". You can dowload these "Publish Settings" infos from the Azure Websites Dashboard

But there is a simpler technic by using the "Kudu" console, just go to this url: http://yoursite.scm.azurewebsites.net

You will need to login with your user name and password (the same you use to login in the Azure Dashboard). Then, through the "Debug console" menu, you can start a CMD or PowerShell console. Then, you can navigate in your site folders as your are in your local environment...


Best
Feb 16, 2015 at 10:45 PM
@jtkech - oh, you're a frickin' genius! I shut everything down, and then cleaned out App_Data like you suggested. It took a while for the app to load, but it finally came up.

Thank you so much! You've saved my marriage! ;-)

Thanks to both of you. I really appreciate it.

Now let's see if we can do something about Orchard's fragility around rogue Modules. That really needs to be fixed.
Feb 17, 2015 at 11:25 AM
Edited Feb 17, 2015 at 11:26 AM
Orchard does prevent certain errors from bringing the whole side down, but I can guess there are certain errors that can still cause widespread trouble. Can you please post a link to the module that caused you trouble? Also what version of Orchard are you using? I'm all for better management of gallery like version compatibility branches, because it is possible to install modules whose compatibility expired long time ago.
Feb 18, 2015 at 3:33 PM
Xeevis wrote:
Orchard does prevent certain errors from bringing the whole side down, but I can guess there are certain errors that can still cause widespread trouble. Can you please post a link to the module that caused you trouble? Also what version of Orchard are you using? I'm all for better management of gallery like version compatibility branches, because it is possible to install modules whose compatibility expired long time ago.
Here you go: http://gallery.orchardproject.net/List/Modules/Orchard.Module.CalendarPreview/1.0

I am running 1.8.1. If I'd been paying attention, I would have seen this issue raised in the comments. But I was in a hurry, saw the module, and thought it'd be a good tool to have.

Lesson learned in a huge way, obviously.

Hope this helps. Anything to make Orchard more stable. :-)
Feb 19, 2015 at 1:31 AM
Edited Feb 19, 2015 at 1:34 AM
Properties that throw the error in the module are not even used by the module o.O ... Still it won't work even with the errors out of the way, it's probably too old even for google services. Gallery could really use cleanup :D.