Try our conversational search powered by Generative AI!

Rest store url return 404 when calling from js



I've try to create sample add-on which has a rest store, but whenever my add-on try to access rest store, it return 404 in url

RestStore code:

    public class DemoStore : RestControllerBase    

JS code:

return declare([_Module], {
        // summary: Module initializer for the default module.

        initialize: function () {


            var registry = this.resolveDependency("epi.storeregistry");
            //Register the demo store
            registry.create("demoapp", this._getRestPath("demostore"), { id: "demoId" });

        _getRestPath: function (name) {
            return routes.getRestPath({ moduleArea: "demoapp", storeName: name });

The url giving 404 is: 


I've tried to search for documentation but no luck. Any help is much appriciate!

Jan 08, 2015 12:18


First thing: your REST Store name is mismatch. [RestStore("DemoStore")] in C# code and this._getRestPath("demostore") in JS code is not matched (case sensitive).

Second thing: is  your moduleArea: "demoapp" matchs the addon name? Is your addon demoapp.dll?

Hope this help.


Edited, Jan 08, 2015 12:33

Aww, my bad. Thanks!

Jan 09, 2015 4:26
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.