Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Limberg Michelsen 22 posts 99 karma points
    Nov 27, 2013 @ 08:46
    Limberg Michelsen
    0

    Umbraco 7 - could not load RestExtension

    I am trying to do an AJAX based e-mail form in Umbraco 7 (I have the newest build 1.0.5073.23298). I am new to the MVC way of doing things - used to working in jQuery and Web Forms.

    I have tried two methods... First I tried using /Base and I got the error:

    Could not load type 'umbraco.presentation.umbracobase.RestExtension' from assembly 'umbraco, Version=1.0.5073.23298, Culture=neutral, PublicKeyToken=null'.

    When accessing f.x. http://localhost:4294/Base/Test/Test

    It doesn't make a difference if Test actually exists.

    I then tried what I have read to be the new method, using Web API. (http://our.umbraco.org/documentation/Reference/WebApi/)

    But adding a new controller in the VS project gives me the exact same error.

    So:

    Am I doing something wrong or missing something?

    Is this a bug in the RC?

    Should I be going about this differently?

  • Anders Burla 2560 posts 8256 karma points
    Nov 27, 2013 @ 13:13
    Anders Burla
    0

    I get this as well for Tea Commerce that im trying to get to work in Umbraco 7.

    Anyone has an idea?

    Kind regards
    Anders

  • Comment author was deleted

    Nov 27, 2013 @ 13:19

    So base just fails? think the RestExtension method might have moved

  • Comment author was deleted

    Nov 27, 2013 @ 13:22

    Looks like it moved to Umbraco.Web.BaseRest (still in the umbraco assembly)

  • Comment author was deleted

    Nov 27, 2013 @ 13:22

    So update your umbraco references to v7 and then add using Umbraco.Web.BaseRest

  • Anders Burla 2560 posts 8256 karma points
    Nov 27, 2013 @ 13:57
    Anders Burla
    0

    I have done that - but still same error.

  • Comment author was deleted

    Nov 27, 2013 @ 14:10

    Hmm that should work, will give it a test

  • Comment author was deleted

    Nov 27, 2013 @ 14:13

    Yeah get the same error

    Could not load type 'umbraco.presentation.umbracobase.RestExtension' from assembly 'umbraco, Version=1.0.5073.21174, Culture=neutral, PublicKeyToken=null'.

    [TypeLoadException: Could not load type 'umbraco.presentation.umbracobase.RestExtension' from assembly 'umbraco, Version=1.0.5073.21174, Culture=neutral, PublicKeyToken=null'.] System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0 System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +371 System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +19 System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +319 System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +203 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +1179 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) +235 Umbraco.Core.<>cDisplayClass10.e(Type t) in c:\Users\Timbo\Documents\GitHub\Umbraco-CMS\src\Umbraco.Core\TypeFinder.cs:443 System.Linq.WhereArrayIterator1.MoveNext() +43 Umbraco.Core.TypeFinder.FindClassesWithAttribute(Type attributeType, IEnumerable1 assemblies, Boolean onlyConcreteClasses) in c:\Users\Timbo\Documents\GitHub\Umbraco-CMS\src\Umbraco.Core\TypeFinder.cs:448 Umbraco.Core.TypeFinder.FindClassesWithAttribute(IEnumerable1 assemblies, Boolean onlyConcreteClasses) in c:\Users\Timbo\Documents\GitHub\Umbraco-CMS\src\Umbraco.Core\TypeFinder.cs:409 Umbraco.Core.TypeFinder.FindClassesWithAttribute(IEnumerable1 assemblies) in c:\Users\Timbo\Documents\GitHub\Umbraco-CMS\src\Umbraco.Core\TypeFinder.cs:467 Umbraco.Core.PluginManager.

    Will add to issue tracker

  • Comment author was deleted

    Nov 27, 2013 @ 14:19

    And don't see a reference to that old namespace in the code... strange will see if Shannon has an idea

  • Comment author was deleted

    Nov 27, 2013 @ 14:21

    Issue is here pinged shannon so hopefully it's solved tomorrow morning :) http://issues.umbraco.org/issue/U4-3734

  • Limberg Michelsen 22 posts 99 karma points
    Nov 27, 2013 @ 15:35
    Limberg Michelsen
    0

    Awesome Tim! So it looks like a bug - so I won't spend any more time on getting it to work until I hear back :)

    Thanks for the quick response

  • Comment author was deleted

    Nov 27, 2013 @ 15:38

    Yup definitely a bug, set to 7.0.1, please follow the issue on the tracker for further details :)

  • Comment author was deleted

    Nov 27, 2013 @ 15:39

    But I can highly recommend api controllers it's even easier then base :) http://umbraco.tv/videos/developer/fundamentals/api-controllers/introduction/

  • Limberg Michelsen 22 posts 99 karma points
    Nov 27, 2013 @ 15:41
    Limberg Michelsen
    0

    Excellent. If I understand this correctly, I need to create a MVC project in VS and add Umbraco to it, in order to use the Web API, correct?

    I tried this, but got the same error as when using Base, when I tried to add a new controller :/ But I will take the Web API route when the bug is fixed :)

  • Trevor Loader 199 posts 256 karma points
    Nov 27, 2013 @ 17:47
    Trevor Loader
    1

    I got the same error a couple of days ago when I upgraded a site to V7.

    However, the 'new' way of doing base via WebAPI works really well!!  I just converted my base file by changing a few lines.

    namespace TestimonialsApi
    {
        public class TestimonialsApiController : Umbraco.Web.WebApi.UmbracoApiController
        {
        [Umbraco.Web.WebApi.MemberAuthorize(AllowAll = true)]
            public HttpResponseMessage Create()
            {
    //same code as before here 

    And can now ajax post to "/Umbraco/Api/TestimonialsApi/Create".

    I can also confirm this works if you just dump this file into the AppCode folder if you don't need/want to create a whole VS Solution for just one WebAPI call.

  • Comment author was deleted

    Nov 27, 2013 @ 17:49

    Sweet thanks for confirming that it's easy :) but yeah we still need to fix that bug but I agree for new stuff just move to web api

  • Shannon Deminick 1524 posts 5269 karma points MVP 2x
    Nov 28, 2013 @ 00:48
    Shannon Deminick
    1

    The problem is uGoLive - we didn't remove the DLL and it hasn't been rebuilt against the v7 dlls so it doesn't work, yet it still exists in the bin folder. It has a /base plugin declared so the plugin manager tries to load it which is why you get this exception.

    Remove all uGoLive dlls from the /bin and it will work.

    We'll update the 7.0.1 codebase to not ship with uGoLive, will add a task and chat to the Core team about what we want to do with uGoLive for 7.1

  • Limberg Michelsen 22 posts 99 karma points
    Nov 28, 2013 @ 00:54
    Limberg Michelsen
    2

    Excellent - easy fix. I can confirm that it works.

    I removed Our.Umbraco.uGoLive.dll, Our.Umbraco.uGoLive.47x.dll and Our.Umbraco.uGoLive.Checks.dll from my referencs / bin and now /Base/Test/Test says '<error>Extension or method not found.</error>', which is correct.

    I can now also add a Controller in Visual Studio without getting that same error

    Thanks for the quick response! This was excellent. I will look into doing my Web API Ajax tomorrow or on friday :)

  • Srikeasvan 6 posts 96 karma points
    Dec 14, 2018 @ 09:47
    Srikeasvan
    0

    I removed as you have mentioned dlls(uGoLive), but still i'm facing this issue.

  • Nenad Kosanovic 18 posts 56 karma points
    Nov 28, 2013 @ 08:47
    Nenad Kosanovic
    0

    Hello all,

    I have problem with umbraco/channels.aspx, it is used for publishing content from word etc. In hendler type of this path is umbraco.presentation.channels.api, umbraco. Is this somehow connected with this issue? When I hitthis path (localhost//umbraco/channels.aspx) in my browser I got :

    Server Error in '/' Application.


    The resource cannot be found.

    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

    Requested URL: /umbraco/channels.aspx


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408

  • Comment author was deleted

    Nov 28, 2013 @ 09:23

    Not related, different bug, please add to issue tracker :) http://issues.umbraco.org/dashboard

  • Anders Burla 2560 posts 8256 karma points
    Nov 28, 2013 @ 09:58
    Anders Burla
    0

    Thanks for finding this bug. I think uGoLive is important for Umbraco - we use it all the time when our client sites go live. So hope that it will be converted to Umbraco 7.

    Kind regards
    Anders

  • Comment author was deleted

    Nov 28, 2013 @ 09:59

    Sourcecode is available for those who dare https://bitbucket.org/mattbrailsford/ugolive/src

Please Sign in or register to post replies

Write your reply to:

Draft