Copied to clipboard

Flag this post as spam?

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


  • Nick Renny 31 posts 63 karma points
    Jul 26, 2013 @ 19:49
    Nick Renny
    0

    Web.WebApi.UmbracoAuthorizeAttribute being called unexpectedly

    I have a system that is set up as two websites, one running umbraco, and one an mvc application, using a custom provider extending umbraco membership provider. The mvc app uses the umbraco logins for auth, and I have a webapi set up in the mvc app. After upgrading to 6.1.3 from 6.0.0 - it now is failing in the AuthorizeAttribute of umbraco, instead of using the one I have decorated my controller with.

    I can't see why, just because I am using the umbraco provider, (referencing the umbraco.dll, and the umbraco.providers dll) this Authorize attrib is being called. 

    Any ideas much appreciated, I've hacked the umbraco.dll to stop it failing without a context for now.

    Start of stack trace below

     

    <Error><Message>An error has occurred.</Message><ExceptionMessage>Value cannot be null.

    Parameter name: umbracoContext</ExceptionMessage><ExceptionType>System.ArgumentNullException</ExceptionType><StackTrace>

    Server stack trace: 

       at Umbraco.Web.WebApi.UmbracoAuthorizeAttribute..ctor(UmbracoContext umbracoContext)

       at Umbraco.Web.WebApi.UmbracoAuthorizeAttribute..ctor()

       at System.RuntimeTypeHandle.CreateCaInstance(RuntimeType type, IRuntimeMethodInfo ctor)

       at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)

Please Sign in or register to post replies

Write your reply to:

Draft