Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am creating an ASP.NET MVC web application that needs to maintain selection state between visits and the plan was to use bookmarks to achieve this.
The application I am interacting with is published, and I am using the following code to create a bookmark and then save the application.
$('#createTileButton').click(function () {
console.info('create tile clicked');
app.bookmark.create('@Guid.NewGuid()', 'A custom tile with reference for \'@Model.TileRef\' for user \'@User.Identity.Name\'').then(function (bookmark) {
//alert(bookmark.id);
console.info('bookmark promise returned');
$('#Bookmark').val(bookmark.id);
app.doSave().then(function () {
console.info('save promise returned');
});
$("form[name='custom-tile-form']").submit();
});
return false;
});
The bookmark doesn't appear to be saving although I am getting a bookmark id returned. I did initially have the form submission with the callback of doSave() however it was never been called.
I am getting a variety of error messages however the app.doSave() tends to return an Error From Engine: with HTTP 403: Permission Denied error but no further details
Any ideas?
Hey Daniel,
You don't need to persist your bookmarks with a app.dosave() actually if this is a published app then your users most likely aren't even allowed to persist changes to a app through doSave().
Your bookmark will be saved scoped to that user as a un-published bookmark. Also try saving your bookmark with a human readable name and not a guid as that may screw things up, strange I know
Hey Daniel,
You don't need to persist your bookmarks with a app.dosave() actually if this is a published app then your users most likely aren't even allowed to persist changes to a app through doSave().
Your bookmark will be saved scoped to that user as a un-published bookmark. Also try saving your bookmark with a human readable name and not a guid as that may screw things up, strange I know
Also the above answer assumes that you have a authenticated user. Anonymous users are not allowed to save bookmarks.
Hi Alex,
Yes I am using an authenticated user. I am not sure what has changed but it now seems to be persisting bookmarks without the save - I am sure I had tried this previously without luck but apparently I hadn't!
Even with the GUID as the name everything seems OK - it would be hard to give a truly unique human readable name within the context of the application.
Daniel