extensions not loading

Topics: Controls
Sep 1, 2009 at 10:19 PM

hey there,

i hope someone can shed some light into this.  ive been searching for days for a solution.  apologies, im new to blognet and the mechanisms of how things work in the background..

using blogengine 1.5.0.7 - out of the box version.  i have the site up and running.. all appears to be fine.  i attempt to load some of the nifty extensions, example - youtube, commentor, mp3player, http://rtur.net/blog/category/Extensions.aspx etc and when i do - the extensions show up as blank in the extensions manager, sometimes they show only a few extensions.  when i remove the newly added extension, they all re-appear.   i have searched a fair bit for a solution.  a suggested solution appears to point to a config file - where one changes "ExtensionType" to be "1" instead of "Extension" - however, this seems to be related to using sql tables, im using the out of the box - non database version of BE. 

some helpfull links are - http://www.codeplex.com/blogengine/WorkItem/View.aspx?WorkItemId=5758 and http://www.binarybits.net/blog/post/2008/07/13/Reason-For-Extensions-Of-BlogEngine-Not-Loading-And-The-Fix.aspx#comment all related to be_datastoresettings

ive checked global.aspx and various other .xml files and can find no reference to the extensiontype. 

any ideas would be greatly appreciated.
Thanks

Eric

Coordinator
Sep 3, 2009 at 9:00 AM

I think those posts you linked to are older posts for older versions of BE.  If you just started off with BE 1.5.0.7, I doubt you're running into what was discussed in those posts.

What do you mean the "extensions show up as blank in the extensions manager".  Do you mean there isn't a row for each of the extensions you added?  Or is there a row for each extension, but clicking the 'View' button shows nothing?  Or are the new extensions not showing up and the old extensions also disappear?

I would try adding one extension at a time, and check the Extensions tab to see if the extension you added causes other extensions to disappear.  Basically, try to narrow it down to the extensions(s) that may be causing a problem.

Sep 3, 2009 at 1:06 PM
Edited Sep 3, 2009 at 1:08 PM

Hey Ben,

Thank you very much for your reply.


Yeah  - I can confirm that the version im using is 1,5,07 - The older posts i linked i thought may be of assistance in resolving.


What I mean about 'the extensions show up as blank' - As you say, there is not a row for each extension added.  Even out of the box, as soon as you add the mp3 player extension (for example), all the rows disappears - remove the added one and voila, they appear again.   All the extensions that come with the 1.5.0.7 offical work just fine.  Its only when i go to add an extension - In fact, I think any extension i add creates this problem.

I don't believe i am adding the extensions in wrong, im following the instructions pretty much to the letter.

Surely someone has come up against this ?

Thanks
Eric

Sep 3, 2009 at 7:49 PM
Edited Sep 3, 2009 at 7:53 PM

hey,

i just tried another full install again. 
- deleted my entire site and downloaded the full web release. 
- installed it with no modifications.
- got the mp3player extension from rtur.net.

http://www.ericmooney.org/temp/before1.JPG
- screenshot 1 shows the extensions list prior to installing the extension

http://www.ericmooney.org/temp/before2.JPG
- screenshot 2 shows a kind of timeout after i tried to refresh the extensions list - this happens straight after i copied over the mp3player.cs file into the \app_code\extensions folder.  feels like its trying to save settings?  could this be it failing while trying to write to some files?  where are the files which contains the list of extensions?

http://www.ericmooney.org/temp/before3.JPG
- screenshot 3 shows only 2 extentions showing after the mp3player.cs was installed - it returns completely to normal again to screenshot 1 after i delete the mp3player.cs file.
- The same issue occurs if i attempt to try install other extentions, except sometimes the list of extensions come up as completely blank/unlisted...

Desperately trying to get a resolution..

Thanks
Eric

Coordinator
Sep 3, 2009 at 10:21 PM

The second screenshot you have shows the "Oops, I can't find the page you're looking for".  This is *not* exactly the same as getting the normal Extensions page without any extensions showing up on it.

The "Oops" page is shown when an unhandled error occurs.  When an unhandled error occurs, by default, you're redirected to the error404.aspx page.

In your web.config file, if you change the existing <customErrors> tag to the following tag, you should then get a real error message, rather than the default redirect to error404.aspx (the tag below is case sensitive, btw).

<customErrors mode="Off">

Sep 4, 2009 at 11:07 AM
Edited Sep 4, 2009 at 11:08 AM

Hey Ben,

Thank you so much for your help.  My apologies - you are correct - its *not* exactly as I had made out - I had missed that all important step.   I really appreciate your help.
Okay, when I changed the web,config I got the following error -

Access to the path 'D:\hshome\ericmoon\ericmooney.org\App_Data\datastore\extensions\mp3player.xml' is denied.

I'm looking at all that and it appears that i dont have access the create the mp3player.xml.  I dont have a file in \App_Data\datastore\extensions\mp3player.xml.  It doesnt actually exist.  is this a creation of file problem?   I seem to have full rights on that entire app_data folder.

I copied smiles.xml to mp3player.xml file to \app_data\datastore\extensions, modified it so it with mp3player details.  when i reloaded the extensions screen, it loaded just fine.  allowing me to admin the mp3player and save changes - sooo it all looks great and i was able to get the mp3player working on a test site.  I couldn't get it working on the live site yet, but it has to be down to the hosting permissions on the folder /audio which im going to look into.

I used this same method of coping over smiles.xml to YouTubePlayer.xml and i was able to get the youtube extension to work.  so it seems once i have saved a .xml file with the settings from the test server, or create a semi blank one from a working .xml file it works just fine!

I cant see a solution - its some form of permissions issue with my hosting company - Thank you very much for your assistance as it helped me look in the right place and get it working somehow. 

Eric

 

Sep 5, 2009 at 10:08 AM

Hi there,

Having a further problem..  After i upload the file mp3player.cs - straight after, when i refresh, the site throws up a dialog box requesting a username and password.  this appears to only happen once.   it doesn't keep happening - its only when i upload the mp3player.cs file (i can replicate the problem each time).   Once this happens, all the extensions stop working.  I have to remove/rename the file to get the extensions back working.

http://www.ericmooney.org/temp/ScreenShotx001.jpg

What kind of authentication problem/issue causes the dialog box to be presented to a web facing user?

I have ensured with the hosting site that the app_data and audio folders are writeable.   They told me they might put the site in an application pool - what impact does that have and what settings should the app pool be using ?

Ps.  i have all this working perfectly on a test server here.

Any ideas please?
Thanks!


Eric

Coordinator
Sep 5, 2009 at 11:02 AM

Every website is in an application pool, actually.  There's various settings an application pool can have, but the "default" settings are usually best to stick with.  At a web hosting company, I would just let them deal with it.

I personally have not used the mp3player extension.  I'm not sure what would cause a dialog box to pop up requesting your username/password.  It could be a problem with permissions being misconfigured at the host.

If you can contact the person who created the extension, or find some other people who are using it, maybe they can help.  Or maybe those people will join this discussion.

Coordinator
Sep 5, 2009 at 4:33 PM
Edited Sep 5, 2009 at 4:35 PM

Eric, can you save this as Example_02.cs and use it as test extension on your host? If this works fine, then we know that your host set up properly and problem with mp3 extension. Let me know how it went, and don't forget to uninstall this extension when you done testing.

 

using BlogEngine.Core.Web.Controls;
using BlogEngine.Core;
 
[Extension("Example_02", "1.0", "<a href=\"http://me.net\">Me</a>")]
public class Example_02
{
    static protected ExtensionSettings _settings = null;
 
    public Example_02()
    {
        Post.Serving += ServingHandler;
        InitSettings();
    }
 
    private void ServingHandler(object sender, ServingEventArgs e)
    {
        if (_settings.GetSingleValue("Case") == "upper")
            e.Body = e.Body.ToUpper();
        else
            e.Body = e.Body.ToLower();
    }
 
    private void InitSettings()
    {
        ExtensionSettings settings = new ExtensionSettings(this);
        settings.IsScalar = true;
        settings.AddParameter("Case");
        settings.AddValue("Case", "upper");
        _settings = ExtensionManager.InitSettings("Example_02", settings);
    }
}

using BlogEngine.Core.Web.Controls;

using BlogEngine.Core;

 

[Extension("Example_02", "1.0", "<a href=\"http://me.net\">Me</a>")]

public class Example_02

{

    static protected ExtensionSettings _settings = null;

 

    public Example_02()

    {

        Post.Serving += ServingHandler;

        InitSettings();

    }

 

    private void ServingHandler(object sender, ServingEventArgs e)

    {

        if (_settings.GetSingleValue("Case") == "upper")

            e.Body = e.Body.ToUpper();

        else

            e.Body = e.Body.ToLower();

    }

 

    private void InitSettings()

    {

        ExtensionSettings settings = new ExtensionSettings(this);

        settings.IsScalar = true;

        settings.AddParameter("Case");

        settings.AddValue("Case", "upper");

        _settings = ExtensionManager.InitSettings("Example_02", settings);

    }

}

 

Sep 6, 2009 at 9:15 AM

Morning Rtur,

Thank you for your help.   I uploaded the example_02.cs file.  When i refreshed the extensions page, the username & password dialog appeared again.   All the extensions that worked stopped working then.   So it is as you say, it appears to be a hosting issue.   Any ideas why it would do that ?  got any suggestions i can run by my hosting company ?
 
Again, thank you for your help!


Eric

Coordinator
Sep 6, 2009 at 11:32 PM
Edited Sep 6, 2009 at 11:33 PM

Eric, you might want to try this super simple extension before contacting your host. If this one is not working, that means you have asp.net application not properly configured in IIS. If it works fine, most likely you have issues with IIS process not having write permission on data folder. Save it as Example_01.cs and check if it will lowercase your posts.

using BlogEngine.Core.Web.Controls;
using BlogEngine.Core;

[Extension("Example_01", "1.0", "Test")]
public class Example_01
{
    public Example_01()
    {
        Post.Serving += ServingHandler;
    }

    private static void ServingHandler(object sender, ServingEventArgs e)
    {
        e.Body = e.Body.ToLower();
    }
}
Sep 7, 2009 at 7:08 AM

Morning.

Thanks very much for your reply rtur.   Itried the example_01.cs file as you suggested.  Unfortunetly, it came up with the dialog box again.    I will pass this entire thread onto the hosting company and see if that helps.  Unfortunetly, I am not an IIS guru and havn't a clue as to how to fix this one.

Again, many thanks to you and ben for your assistance.

Eric

Sep 7, 2009 at 7:05 PM

Hello again..

*Sigh*  I dispair!  after sending info to the hosting company and pointing them to this thread. this is what i got back -

Our engineers have tested this as much as they can but they cannot find any issues with the server. The only problem that they can find is when this specific software tries to run on the server. We have numerous other customers that run applications through the server without any issues.

As the server you are on is a shared hosting environment our system administrators would not be able to make changes to suit one site as those changes would affect all other users. When we have numerous other customers that run applications through the server without any issues this would just not be feasible.


I've requested a technical breif into the reasons why the extensions don't load..   Its such a pain to  have to swap hosting companies. 

defeated.
Eric

May 3, 2010 at 4:18 PM

You would by any chance be using Surftown as your hosting company ?. 

I have the exact same problem with BlogEngine.Net 1.6.1 and Surftown. 

May 30, 2010 at 3:24 PM
Edited May 30, 2010 at 3:25 PM

I came here looking for the same issue of extensions not getting displayed in Admin section of blogengine.

But none of the above solutions worked for me.

Then i debugged the blogengine code and found the strange issue. The blogengine code looks in the web.config for possible code subdirectories tags and searches for the extensions only if the code subdirectories was not mentioned at all!!

My situation is like this:

In my web.config file, I have created some tags for defining code subdirectories like this:

 

<codeSubDirectories>
            <add directoryName="YAF" />
            <add directoryName="Components"/>
</codeSubDirectories>
 

There is a function called "public static ArrayList CodeAssemblies()" in file "BlogEngine.Core\Utils.cs". This function reads the assemblies and only reads the extensions directory if there was no code subdirectory mentioned in web.config file.

if (s != null && s.CodeSubDirectories != null && s.CodeSubDirectories.Count > 0)
{
	for (int i = 0; i < s.CodeSubDirectories.Count; i++)
	{
		assemblyName = "App_SubCode_" + s.CodeSubDirectories[i].DirectoryName;
			codeAssemblies.Add(Assembly.Load(assemblyName));
	}
}
else
{
	Type t = Type.GetType("Mono.Runtime");
	if (t != null) assemblyName = "App_Code";
	codeAssemblies.Add(Assembly.Load(assemblyName));
}

I am not sure if this is a possible bug or not.

To fix the issue, i simply removed the codesubdirectory tags from my web.config and it worked for me. the entensions starte dshowing up instantly.

I hope it may help somebody else also.

In case you want to see my implementation of blogEnginedotnet, you can see it www.am22tech.com/blogs here.

Coordinator
May 30, 2010 at 8:19 PM
Subdirectories used in BlogEngine to support extensions in C# and VB.NET - you would have to name subdirectories CS and VB to get them working.