Create SharePoint hosted app when i debug project in IE browser getting error "Operation aborted" .

Hi all,
I am create SharePoint hosted app for SharePoint online. When i debugs project in IE browser getting error "Operation aborted".
 Please Suggest appropriate Way.
Thanks
Akash Anand 

This happens sometimes if you are using third party library which IE does not support. Change the default browser of Visual Studio to Google Chrome and try.
Let us know either it works or not
Regards
Khalil Kothia, PMP
Blog

Similar Messages

  • How to redirect to SharePoint hosted app when user lands on site collection

    is it possible to redirect user directly to SharePoint hosted app when he enters to the site collection? Currently
    user have to click on the app to navigate to SharePoint hosted app and I would like them to directly navigate to app without any clicks required.

    <script type="text/javascript" >
    SP.SOD.executeFunc('SP.JS', 'sp.ClientContext', function() {
    var ctx = new SP.ClientContext.get_current();
    var web = ctx.get_web();
    var appInstances = SP.AppCatalog.getAppInstances(ctx, web);
    ctx.load(appInstances);
    ctx.executeQueryAsync(
    function() {
    window.location =
    appInstances.getItemAtIndex(1).get_appWebFullUrl();
    function(sender, args) {
    console.log(JSON.stringify(args));
    </script>

  • OnPremise: Sharepoint Hosted App gives 401 unauthorized error while accessing UserProfile Rest Service

    Hi All,
    I have SharePoint hosted app deployed on On-Premise using(F5) which reads User Profile data consumes WCF(Hosted on same server) through REST API to insert data in to SQL DB(Different server).
    SharePoint hosted app was working as expected and suddenly it started asking for credential and not login(any user) to the application landing page.
    Checked SharePoint Logs, IIS Logs and Windows log but did not get any clue.
    WCF is accessible, User Profile access is also happening but not sure what changes done on server or infra level which causing this issue.
    I have an On-Premise Environment for SharePoint 2013. where we have created SharePoint hosted app which calls "http:///_api/SP.UserProfiles.PeopleManager/GetMyProperties" to get current user's data. but this gives me 401 unauthorized error.
    Notes:
    I had given read permission to user profile and full control to sitecollection in appmanifest. If I run this app on Office 365 developer site it works fine, but on premise environment it give 401 error.
    On premise environment when I deploy this app 3 times it prompt for  credential and finally gives the following error
    Error message after login 3 times:
    {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access
    denied. You do not have permission to perform this action or access this resource."}}}
    -Lovekush Kumar 

    Add your site (http://*.app.contoso.com) to your local intranet sites in IE. 
    "app.contoso.com" is app domain.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Caml query for filtering list item not working as expected in Sharepoint hosted app

    I am trying to filter list item based on particular value.
    var header = "xyz";
    camlQueryHeader.set_viewXml = "<view><Query><Where><Eq><FieldRef Name='Position'/>" + "<Value Type='Text'>" + header + "</Value></Eq></Where></Query></view>";
    Instead of getting filtered list items, I get all the list items. What am I missing?
    Note: I am creating Sharepoint hosted app using CSOM.
    regards, Ritesh Anand

    Hi,
    According to the code provided, I suggest you modify the code like this:
    camlQueryHeader.set_viewXml('<view><Query><Where><Eq><FieldRef Name=\'Position\'/>' + '<Value Type=\'Text\'>' + header + '</Value></Eq></Where></Query></view>');
    Here is a documentation of how to use the viewXml property of SP.CamlQuery object:
    SP.CamlQuery.viewXml Property
    Thanks
    Patrick Liang
    TechNet Community Support

  • How to open List when Page loads in SharePoint Hosted App?

    I  want to create an app same like InstantPracticeManager by InstantQuick.
    Now I want to know that in a SharePoint Hosted App How can I show the Whole List in a page. 
    Here I have added one image:
    Here there is one list and there are 4 views of that list.
    Now the App will be like when I load the page It will show like the image above. Now how can we show the list like this in sharepoint hosted app?
    I want the same scenario which is shown in the following blogs:
    http://sp2013.blogspot.in/2012/08/use-list-view-in-sharepoint-2013-apps.html
    and
    http://www.sharepointnutsandbolts.com/2013/08/working-with-web-parts-within.html
    where they add a list to an app
    Can any one suggest me the idea? I am bit confused.
    thanks in advance.

    Hi,
    According to your post, my understanding is that you want to show the different list view in a page in SharePoint Hosted App.
    We can use jQuery and cross-domain library to achieve it.
    The following articles for your reference:
    Adding a Tabbed View to A Web Part Page Using jQueryUI
    http://sympmarc.com/2011/11/09/adding-a-tabbed-view-to-a-web-part-page-using-jqueryui/
    How to: Access SharePoint 2013 data from apps using the cross-domain library
    http://msdn.microsoft.com/en-us/library/office/fp179927(v=office.15).aspx
    SharePoint 2013: Get list items by using the cross-domain library (JSOM)
    http://code.msdn.microsoft.com/office/SharePoint-2013-Get-items-d48150ae/view/SourceCode#content
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Sharepoint-Hosted App giving FORBIDDEN error when i use REST Api

    Hi,
    I have created a sharepoint hosted app which will create Team site on button click.
    I used REST Api  and  NAPA Tool to develop this app.
    Napa tool gives to things ClientWebpart.aspx and Default.aspx.
    When i run my Default.aspx code is working fine but ClientWebpart.aspx is giving FORBIDDEN error when i am trying to create site.
    Below is the code which i used to create site
    code:
    var hostweburl;
    var appweburl;
    $(document).ready(function () {
    hostweburl= decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    function createSPWeb() {
    $.ajax(
    url: appweburl +
    "/_api/SP.AppContextSite(@target)/web/webinfos/add?@target='" +
    hostweburl + "'",
    type: "POST",
    data: JSON.stringify(
    'parameters':
    '__metadata': { 'type': 'SP.WebInfoCreationInformation' },
    'Url': 'RestSubWeb',
    'Title': 'RestSubWeb',
    'Description': 'REST created web',
    'Language': 1033,
    'WebTemplate': 'sts#0',
    'UseUniquePermissions': false
    headers: {
    "accept": "application/json;odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    success: successHandler,
    error: errorHandler
    NOTE:This is on sharepoint online.
    Please help
    Regards,
    sudeep

    So in the app you are testing, are you using the FQDN or the NetBIOS name? Bad practice but could you test with both (hard code the absolute URL for testing purposes) then retest your app?
    If you are making a web part based on the new app model this will be an "app part" and probably have the same issues you are experiencing. If this is for something internal rather than a product you are developing to resell then the script editor /
    content editor web part approach could work for you.
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • Web event receiver when adding or deleting a SharePoint hosted app

    Hi,
    Is it possible to start an action when a SharePoint hosted app is added or deleted from a site collection on our SharePoint 2013 farm on premise?
    Also for public apps. Therefore, working with ‘App events’ are not an option.
    It tried already with a web event receiver: ‘OnSiteCreated’ and ‘WebDeleting’, but this is not working with appweb's.
    When I create a normal subsite, the event is fired. When I added an app to the site, the event is not fired.
    Regards,
    Johan

    Hi Johan,
    yes you can do that, try the following:
    https://msdn.microsoft.com/en-us/library/office/jj220048(v=office.15).aspx#APPRER
    https://msdn.microsoft.com/en-us/library/office/jj220052(v=office.15).aspx
    Kind Regards,
    John Naguib
    Technical Consultant/Architect
    MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation
    Please remember to mark your question as answered if this solves your problem

  • SharePoint Hosted App - Creating cascaded drop down on hosted web lists

    Hi,
    I have created an SharePoint Hosted App(Javascript Object Model) that creates lists on the host web.
    I need to put some javascript into new and edit forms in order to create the cascaded drop down effect on 2 lookup fields.
    Can you please give me some advise?
    Regards,
    Marian

    Hope below article should help you
    http://blog.pentalogic.net/2010/11/editing-the-sharepoint-list-item-menu-part-2-using-javascript/
    http://www.getinthesky.com/2014/03/hide-text-field-sharepoint-form-using-jquery/
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/030471b2-d19a-470f-9a9e-0fd8a229138b/how-do-i-create-a-new-item-form-that-allows-to-save-and-continue-editing?forum=sharepointcustomizationlegacy

  • Error when trying to retrieve Document Library in Sharepoint Hosted App using REST

    I have created the following REST request in order to retrieve the root folder of a Document Library added to a Sharepoint Hosted App
    getProductDocumentFolder: function () {
    $.ajax({
    url: _spPageContextInfo.webServerRelativeUrl +
    "/_api/web/GetFolderByServerRelativeUrl('/Lists/ProductDocuments')",
    type: "GET",
    headers: {
    "accept": "application/json;odata=verbose",
    success: function () {
    alert("Success!");
    //REST.Operator.readAll();
    error: function (err) {
    alert("Oops, error!");
    alert(JSON.stringify(err));
    The Document Library was added to the App from the Add > New Item menu in Visual Studio. I selected List and Selected Document Library from the Create a customizable list... dialog. The list is defined as shown in the picture below.
    I get the generic error "Value does not fall within the excepted range".
    I have tried both 
    "/_api/web/GetFolderByServerRelativeUrl('/Lists/ProductDocuments')"
    and
    "/_api/web/GetFolderByServerRelativeUrl('/ProductDocuments')"
    for the Document Library URL both I get the same error in both cases.
    What am I missing here?

    Problem solved. 
    It turns out there should be NO leading '/' in the relative URL despite the example shown in http://msdn.microsoft.com/en-us/library/office/dn292553.aspx#Folders with "/Shared Folder".
    The correct GetFolderByServerRelativeUrl-parameter in my case is 'Lists/Productdocuments'.
    Unsure whether example is wrong or if it applies to other cases than mine.

  • Unable to update rating (rating column) on host document using JavaScript Object Model API inside sharepoint hosted apps

    Hi Everyone,
    We are developing SharePoint hosted apps for Office 365, for that we are going
    to implement document rating functionality inside Sharepoint app. The host web contain document library (“Documents”) and from apps we need to rate each document. The rating functionality working fine with CQWP in team site  using
    JavaScript Object Model API.
    But the same code is not working inside apps and giving error:-
    If we are using app context than error will be:-
    "List does not exist.
    The page you selected contains a list that does not exist.  It may have been deleted by another user."
    And for Host context than error will be:-
    "Unexpected response data from server."
    Please help on this
    Please see below code..
    'use strict';
    var web, list, listItems, hostUrl, videoId, output = "";
    var videoLibrary = "Documents";
    var context, currentContext;
    var lists, listID;
    var list, parentContext;
    var scriptbase;
    (function () {
        // This code runs when the DOM is ready and creates a context object which is 
        // needed to use the SharePoint object model
        $(document).ready(function () {
            hostUrl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
            context = SP.ClientContext.get_current();      
            SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);
        function sharePointReady() {
            scriptbase = hostUrl + "/_layouts/15/";
            // Load the js files and continue to the successHandler
            $.getScript(scriptbase + "SP.Runtime.js", function () {
                $.getScript(scriptbase + "SP.js", function () {
                    $.getScript(scriptbase + "SP.Core.js", function () {
                        $.getScript(scriptbase + "reputation.js", function () {
                            $.getScript(scriptbase + "sp.requestexecutor.js", execCrossDomainRequest);
        //Query list from hostweb
        function execCrossDomainRequest() {       
            //Load the list from hostweb
            parentContext = new SP.AppContextSite(context, hostUrl);
            web = parentContext.get_web();
            list = web.get_lists().getByTitle(videoLibrary);
            context.load(list, 'Title', 'Id');
            var camlQuery = new SP.CamlQuery();
            camlQuery.set_viewXml('<View><Query><OrderBy><FieldRef Name="Modified" Ascending="FALSE"/></OrderBy></Query><RowLimit>1</RowLimit></View>');
            listItems = list.getItems(camlQuery);        
            context.load(listItems);
            context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
        //Process the image library
        function onQuerySucceeded() {       
            var lstID = list.get_id();
            var ctx = new SP.ClientContext(hostUrl);       
            var ratingValue = 4;
            EnsureScriptFunc('reputation.js', 'Microsoft.Office.Server.ReputationModel.Reputation', function() {      
            Microsoft.Office.Server.ReputationModel.Reputation.setRating(ctx, lstID, 1, ratingValue);       
            ctx.executeQueryAsync(RatingSuccess, RatingFailure);
        function onQueryFailed(sender, args) {
            alert('Failed' + args.get_message());
        function failed(sender, args) {
            alert("failed because:" + args.get_message());
        function RatingSuccess() {
            alert('rating set');
            //displaystar();
        function RatingFailure(sender, args) {
            alert('Rating failed : : ' + args.get_message());
        //Gets the query string paramter
        function getQueryStringParameter(paramToRetrieve) {
            var params;
            params = document.URL.split("?")[1].split("&");
            for (var i = 0; i < params.length; i = i + 1) {
                var singleParam = params[i].split("=");
                if (singleParam[0] == paramToRetrieve) return singleParam[1];
    Thanks & Regards
    Sanjay 
    Thank you in advance! :-)
          

    Hi,
    According to your post, my understanding is that you want to update list column in SharePoint hosted apps using JavaScript Client Object Model.
    Based on the error message, it seems not retrieve the list object in context. I suggest you debug the code step by step using Internet Explorer Developer Tools to
    find the problem.
    Here are some demos about using JavaScript Client Object Model in SharePoint hosted app:
    http://blogs.msdn.com/b/officeapps/archive/2012/09/04/using-the-javascript-object-model-jsom-in-apps-for-sharepoint.aspx
    http://sharepoint.stackexchange.com/questions/55334/how-to-access-list-in-sharepoint-hosted-app
    http://www.dotnetcurry.com/showarticle.aspx?ID=1028
    Best regards
    Zhengyu Guo
    TechNet Community Support

  • Issue with Workflow in a SharePoint-hosted App Application

    Hi,
    I have created a Sharepoint-hosted app which has a list workflow in it. After I deploy it to the sharepoint server,  I can not find any workflow under the associated list.
    However, I did have target list associated with workflow in workflow project property.  
    (My app and worflow is developed in VS 2012)
    I have searched the forum and found some similar question. However, all of them don't have useful answers.....
    Can anyone give me some help~?

    Hi Baron123,
    I can reproduce your scenario, that create an app with list, and add a workflow associates with it, the workflow is not working, that seems doesn’t associates successfully.
    Before I can tell why this happens, I found a helpful blog about keeping the list definitions and workflow definitions separate, use Handle APP installed event receiver to wire up a workflow to lists in app web or host web.
    As it is not a good solution to deploy the list and workflow in the same app solution, because that if you redeploy the app the date will be lost, the list will be new created, so I would suggest you to reference the blog, check whether this can meet your
    requirement.
    SharePoint Apps and Workflow:
    http://jonfancey.azurewebsites.net/2013/03/22/SharePointAppsAndWorkflow.aspx
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Can't add images to announcements in SharePoint-hosted app in Office 365

    I tried something very simple:
    Create a new SharePoint-hosted app
    Add a new list to the app, based on the Announcements template
    Deploy the app to my Dev site on Office 365
    When I now add a new item (aka a new announcement) and try to add an image to the Body field, I encounter two errors (depending on whether I try to add an image from my Computer or from SharePoint)
    Adding from my computer gives me an unexpected error:
    Adding from SharePoint shows me a structure of all the apps in my hostweb, but no way to upload an image either to the hostweb or the appweb:
    Is it not possible to add images to a Rich Text field in a list in an app?

    Hi Rene,
    For inserting any image from you computer to you App web, you need to create a separate picture library in your app web manually i.e. in your SharePoint hosted app add a new list item, under list settings window choose "create a list instance
    base on existing list template" and in the drop down select
    picture library. Now deploy the app and try again.
    Generally when we insert any image from our computer to a SharePoint rich text field, the image gets upload in one of the document libraries, but this option is not available in the newly created app web, as it doesn't contains any separate library..
    For you next error, make sure that in the app manifest you are providing
    read access on the web, this will resolve you second problem.
    Hope it helps you.....

  • SharePoint hosted app issue - This page cannot be displayed

    Hi All, need help on below issue, 
    When I deploy SharePoint hosted app from Visual Studio 2012, it generated app web URL and that opens the app properly. But, if I upload .app file after
    publish in Visual Studio 2012 to App Catalog and added new app based on my SharePoint hosted app. When try to click on app, saying ‘This page can’t be displayed’ in internet explorer. I don’t think so it will be issue with app domain as the app working fine
    if deploy from visual studio. Thanks in advance for your help.

    It may still be an issue with the app domain, actually with DNS.  When you deploy from VS 2012 it automatically adds the appropriate DNS entries to the Hosts file on your VS 2012 PC.  That way the App domain can be resolved and you can reach the
    site.  When you deploy by uploading to the App Catalog that entry in the HOsts file is not created.  Instead you should ahve already added the App domain and a wildcard entry to the DNS server used in your network.  If that wasn't done then
    you will get exactly the behavior you describe.
    Take a look at the section on DNS in the following article.  Make sure you've followed all the instructions.
    http://technet.microsoft.com/en-us/library/fp161236(v=office.15).aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • SharePoint hosted app part and SPHostUrl + SPAppWebUrl

    Hi,
    I have sharepoint hosted app that gets hostweburl and appweburl with the next lines 
    function getUrl() {
    hostweburl = getQueryStringParameter("SPHostUrl");
    appweburl = getQueryStringParameter("SPAppWebUrl");
    hostweburl = decodeURIComponent(hostweburl);
    appweburl = decodeURIComponent(appweburl);
    var scriptbase = hostweburl + "/_layouts/15/";
    $.getScript(scriptbase + "SP.Runtime.js",
    function () {
    $.getScript(scriptbase + "SP.js",
    function () { $.getScript(scriptbase + "SP.RequestExecutor.js", execOperation); }
    function execOperation() {
    context = new SP.ClientContext(appweburl);
    appContextSite = new SP.AppContextSite(context, hostweburl);
    And this works fine. But when I'm creating app part those hostweburl and appweburl fields are undefined. So I cant get the context and everything is broken. Is this done in some other way in app parts? 

    Like this in the ClientWebPart   
    <Content
          Type="html"
          Src="~appWebUrl/Pages/Welcome.aspx?{StandardTokens}&amp;ShowImage=_ShowImage_" />
    The {StandardTokens} contains all the queryString parameters you need.
    Author,
    Microsoft SharePoint 2013 App Development
    Author,
    Professional Business Connectivity Services
    Author,
    Inside SharePoint 2013
    Blog, www.shillier.com
    Twitter, @ScotHillier
    SharePoint Trainer, Critical Path Training

  • Deployed lists in a SharePoint hosted app use the wrong content type.

    I am using Visual Studio Ultimate 2013 to deploy a SharePoint hosted app to my SharePoint 2013 development environment. 
    I have created 2 lists, one of which is using a custom content type with custom columns and the other is just a simple custom list definition and instance, all of which are deployed inside the same feature.
    However when I go to the simple list, it is using the content type from the other list, even though in the schema.xml shows that it is not supposed to use this content type. I have checked the content type ID and it is not referencing my custom content type,
    but for some reason the list is using that content type.
    I remember seeing this same issue a few months ago while creating a SP2010 sandbox solution. It could well be something I'm doing wrong when creating the lists/content type.
    Steps to recreate this issue:
    Create a SharePoint hosted app in VS
    Create some custom fields
    Create a custom content type
    Create a list based on that content type
    Create another list not based on the content type
    Delete feature that VS creates for the second list and add the list def and instance to the main feature (containing the other list and content type)
    Deploy and go to second list, note that it has the custom fields from the first list.
    Any advice on what to do about this would be great. I have tried deleting the list and recreating it in VS several times but that didn't work.
    Thanks
    David

    Hi
    I have now tested against a trail Office  365 Developer site and I had to make a few adjustments
    - change the url
    - change the target to SharePoint Onlne
    - change the url 
    I still wasn't happy so I created a new SharePoint Hosted app and pointed at the above developer site.  I copied my CrossDomainExec.js and stripped all my code except my CopyItemInSameLIbrary method which hasn't changed since I created this post. 
    - changed the App Manifest permissions to Web -full Control ( was previously tenant)
    I still got errors which is really painful as you don't even see the POST request in Fiddler
    The URL used for my POST is as follows ( note host URL is fictitious)
    "https://myapphell-547d8061d39e38.sharepoint.com/sites/appsdev/RESTTestSHA/_api/SP.AppContextSite(@target)/web/Getfilebyserverrelativeurl('/sites/appsdev/Shared Documents/SrcDoc.docx')/copyTo(strNewUrl='/sites/appsdev/Shared Documents/DestDoc.docx', bOverWrite=true)?@target='https://myapphell.sharepoint.com/sites/appsdev'" String
    Ran the app a second time and now I see......Wow it WORKS!!!!!! ..Can't be true can it?
    .... next I will switch the target url to my on prem farm to see if this still works so watch this space!
    Daniel
    Freelance consultant

Maybe you are looking for

  • EDI Output ZB00 not getting determined in case of Split Deliveries.

    Hello All, A very Good Morning to you, Hope you are doing good, We have come across one critical Issue where the EDI Output ZB00 Dispatch Advice is not getting determined in case of few Split Deliveries in PROD. Issue : On a daily basis our Client is

  • Backup to Tape ; Some Design questions

    Version : We have DBs on 10.2, 11.2 Enterprise Edition Platform: Solaris 5.10 SPARC Helloo.. Never worked on Tape before. Currently , all our RMAN Backup Pieces are going to Disk and from there Sysadmin moves it to the tape using TSM. 1. If you were

  • Idoc Not reaching PI even with 03 status

    Hi everybody There are many posts with similar question, but none of them could help me. I am trying to post an IDOC from one SAP system 3.1 to SAP 6.0 through PI. I added FIDCC1 to to my partner profile in BD64. I am creating a invoice and clearing

  • Dynamic calc account using an attribute filter

    Hi experts, I have an account member as a dynamic calc tagged as two-pass, Its formula is: StoreMember1 / (StoreMember2/StoreMember3->MEMBER_IN_SPARSE_DIM), When i'm using an attribute filter that´s linked to one of my sparse dimensions the values of

  • Two macs, one can connect to iPhone update server, one cannot

    We have multiple macs and iphones in the house.  One mac can connect to the iphone update server without any problems.  the other cannot.  Both are on the same network.  Both have identical firewall settings.  One mac can manually download the iphone