Copied to clipboard

Flag this post as spam?

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


  • Alastair Todd 44 posts 142 karma points
    May 10, 2016 @ 16:35
    Alastair Todd
    0

    Model Builder dll mode unauthorised 401

    I mean what the...

    I was editing a document type, trying to add a new property. Umbraco backoffice totally unresponsive, made a reboot.

    Now when I try and edit that document type, I get sent back to the login form. Dev tools sayin

    angular.min.js?cdv=879531215:106 GET http://showumbraco.local/api/ModelsBuilderBackOffice/GetModelsOutOfDateStatus 401 (Unauthorized)

    Turn off model builder in web.config (dll mode) everything OK again.

    Tried deleting all generated classes and the models dll reference and retrying same thing. Broke.

    Now what? How can I reset model builder? I mean I've invested in it, its all through my content services.

  • Alastair Todd 44 posts 142 karma points
    May 10, 2016 @ 16:53
    Alastair Todd
    0

    Had to remove this from app startup:

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{action}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );
    
  • Shahid Iqbal 3 posts 71 karma points
    Oct 16, 2017 @ 11:36
    Shahid Iqbal
    0

    Thanks, I had the same issue and your solution worked for me.

  • Alastair Todd 44 posts 142 karma points
    May 10, 2016 @ 17:22
    Alastair Todd
    0

    Also, I learnt a lesson about LiveDll mode for Model Builder - it makes the back-end completely unusable performance-wise.

    Instead I had to track down the hard-to-find documentation on how to use plain old Dll mode - having to generate one's own model.

    And that my friends can be found in the Developer dashboard, 4th tab...

    Seems a great tool but suffering from an identity crisis about once being a standalone package and now being part of Umbraco (7.4.1+)

    The docs need a good clean up and some expansion with clear examples.

    I've also been flaying in the dark about how to use the models in my own content web api service.

  • Adrian Martin 2 posts 73 karma points
    Aug 27, 2017 @ 19:13
    Adrian Martin
    2

    Thanks man. I removed the api route and that fixed it. But I needed my api route so I found out that if you just move it to the OnApplicationStarted event instead, it'll work like a charm.

    public class Global : Umbraco.Web.UmbracoApplication
    {
        protected override void OnApplicationStarted(object sender, EventArgs e)
        {
            GlobalConfiguration.Configure(WebApiConfig.Register); // NEW way
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            base.OnApplicationStarted(sender, e);
        }
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft