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'.
Could not load type 'umbraco.presentation.umbracobase.RestExtension' from assembly 'umbraco, Version=1.0.5073.21174, Culture=neutral, PublicKeyToken=null'.
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 :)
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.
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
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 :)
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
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.
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?
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
So base just fails? think the RestExtension method might have moved
Comment author was deleted
Looks like it moved to Umbraco.Web.BaseRest (still in the umbraco assembly)
Comment author was deleted
So update your umbraco references to v7 and then add using Umbraco.Web.BaseRest
I have done that - but still same error.
Comment author was deleted
Hmm that should work, will give it a test
Comment author was deleted
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.WhereArrayIterator
1.MoveNext() +43 Umbraco.Core.TypeFinder.FindClassesWithAttribute(Type attributeType, IEnumerable
1 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(IEnumerable
1 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
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
Issue is here pinged shannon so hopefully it's solved tomorrow morning :) http://issues.umbraco.org/issue/U4-3734
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
Yup definitely a bug, set to 7.0.1, please follow the issue on the tracker for further details :)
Comment author was deleted
But I can highly recommend api controllers it's even easier then base :) http://umbraco.tv/videos/developer/fundamentals/api-controllers/introduction/
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 :)
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.
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
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
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
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 :)
I removed as you have mentioned dlls(uGoLive), but still i'm facing this issue.
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
Not related, different bug, please add to issue tracker :) http://issues.umbraco.org/dashboard
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
Sourcecode is available for those who dare https://bitbucket.org/mattbrailsford/ugolive/src
is working on a reply...