SharePoint Online - Provider hosted App - Deployed in on-premise environment

Hi
We are evaluating SharePoint online and wanted to know if the following is possible? If yes, can anyone share his/her experience and issues faced?
We want to deploy a provider-hosted app to a on-premise environment. This app will need to connect to SharePoint online. What are the requirements from hosting perspective for the on-premise server? Does the server require anything specific so that it is
able to connect to SPOnline? Should it be outside the corporate firewall?
What is the difference between SharePoint online standard and dedicated plans, in the context of Provider hosted app. Are there limitations with respect to what can & cannot be done in a Provider hosted app in these environments?
How do I know if am using a SharePoint online standard or a dedicated plan? Where to look for?
I have seen few articles where the provider hosted app is deployed to windows azure and is connecting to SharePoint online. However this is not the case with us (i.e. we do not have windows azure for now)
Regards,
Deven

Below links answer most of your questions:
App- code
http://msdn.microsoft.com/en-us/library/office/fp142381(v=office.15).aspx 
How to create high trust apps-  http://msdn.microsoft.com/en-us/library/office/fp179901(v=office.15).aspx
How to deploy- http://msdn.microsoft.com/en-us/library/office/jj860570(v=office.15).aspx
Go to billing and subscriptions and you will see what plan you have. Dedicated plans names and options are in this link- http://technet.microsoft.com/en-us/library/dn151715.aspx 
Regards
Libin
Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Mark As Answer Feel free to unmark answer if does not resolves your problem.

Similar Messages

  • Sharepoint online provider-hosted app AppEventReceiver callout failed.

    I've created an AppEventReceiver for sharepoint online provider-hosted app, I can deploy the app if i hosted the remote web application on MS Azure, it work fine. if hosted the remote web application on local machine IIS whith public ip address, when
    I deploy the app online the following error:
    The remote event receiver callout failed.
    Details: There was no endpoint listening at
    http://115.193.xxx.xxx:6666/AppEventReceiver.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
    two question:
    1. does the provider-hosted app, (remote web application  )must host on Azure so that the AppEventReceiver (appinstalled) then trigger?
    2. what need to do when host on local machine IIS whith public ip address?

    try these link:
    http://www.sharepointnutsandbolts.com/2013/07/deploying-sp2013-provider-hosted.html
    if you are using office365 for sharepoint then you can develope list using sandbox solution .

  • SharePoint 2013 Provider hosted App installation error

    Hi All,
    I am trying to install a provider hosted app in SharePoint 2013. Installation goes for about 15mins and get "Sorry, something went wrong
    with adding the app. Click to retry."
    Please find belw ULS details for Correlation ID:
    Error when try to get access token when deploy AppInstanceId 7bcf1d9d-897a-48a1-b4f4-cd3120fd98a5 with AppPrincipalId i:0i.t|ms.sp.ext|[email protected]01b993b6. Exception=System.InvalidOperationException:
    An unexpected error was returned from the delegation service.  Error Code: 'invalid_client' Error Description: 'ACS65003: The clientId 'd12de581-316c-4224-b58b-e91ac2042150/www.SERVERNAME.DOMAIN.com@0d85160c-5899-44ca-acc8-db1501b993b6' is not a valid
    service identity.  Trace ID: 4a0c4974-94f4-4077-9a22-2ba5f0abb444  Correlation ID: 674d9839-686b-45f3-be46-31db4dc2a9d0  Timestamp: 2014-07-23 09:34:49Z'    
     at Microsoft.SharePoint.Administration.SPAzureAccessControlDelegationServiceClient.HandleUnexpectedError(SPAzureAccessControlDelegationServiceResponse delegationServiceResponse)    
     at Microsoft.SharePoint.ApplicationServices.SPApplicationContextAccessToken.GetResponseOrThrow[T](SPAzureAccessControlDelegationServiceClient delegationServiceClient, SPAzureAccessControlDelegationServiceResponse delegationServiceResponse)    
     at Microsoft.SharePoint.ApplicationServices.SPApplicationContextAccessToken.IssueApplicationContextAccessToken(SPServiceContext serviceContext, SPApplicationContextAccessTokenCreationParameters creationParameters)    
     at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForApplicationContext(SPIdentityContext userIdentityContext, String applicationId, Uri applicationRealm, SPApplicationContextAccessTokenType applicationTokenType, SPApplicationDelegationConsentType
    consentValue)    
     at Microsoft.SharePoint.SPServerToAppServerAccessTokenManager.GetAccessTokenForDeploymentTask(Guid siteId, SPUserToken userToken, String appPrincipalId)    
     at Microsoft.SharePoint.Lifecycle.SPAppPrincipalAccessTokenTask.<>c__DisplayClass1.<Deploy>b__0()
    sudesh withanage

    Hi  sudesh,
    According to your description, my understanding is that you encountered the error “An unexpected error was returned from the delegation service" when you try to add a SharePoint 2013 Provider hosted App.
    As the error message says, the clientId 'd12de581-316c-4224-b58b-e91ac2042150/www.SERVERNAME.DOMAIN.com@0d85160c-5899-44ca-acc8-db1501b993b6' is not a valid service identity when your SharePoint  try
    to get access token via ACS. Is there any plans to develop a low trust mechanism for non-connected scenarios? i.e. low trust provider hosted apps with no external connection, like say for a Bank who lock down external access.  Please  follow the
    steps as the blog  to set development environment for  SharePoint Low-Trust Apps:
    http://blogs.msdn.com/b/besidethepoint/archive/2012/12/10/sharepoint-low-trust-apps-for-on-premises-deployments.aspx?PageIndex=1#comments
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to debug sharepoint 2013 provider hosted app?

    We developed SharePoint 2013 provider hosted app using MVC 5 Entity Framework of Database first and publish in Windows Azure site as well as deployed that project to our SharePoint app Catalog. We need to change Windows azure site so we
    changed to publish in  another Windows Azure site and deployed again to our SharePoint app Catalog. No problem the app is working after we changed Windows Azure site. I am new of this technology I faced so hard of changed
    existing Windows Azure site to New Windows Azure site. Please tell me how to debug the SharePoint Provider hosted app? Please tell me step by step process.
     Thanks in Advance.

    Hi,
    According to your description, you might want to know how to debug provider hosted app.
    To get a quick start, I would suggest you take a look at the link below about
    Debugging SharePoint Apps That Are Hosted In Windows Azure Web Sites:
    http://blogs.technet.com/b/speschka/archive/2013/11/25/debugging-sharepoint-apps-that-are-hosted-in-windows-azure-web-sites.aspx
    Another two similar articles for your reference:
    http://sharepointfieldnotes.blogspot.jp/2013/03/making-it-easy-to-develop-and-debug.html
    http://blogs.msdn.com/b/officeapps/archive/2013/01/03/debugging-remote-event-receivers-with-visual-studio.aspx
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Report Viewer control in sharepoint 2013 provider hosted app

    sharepointSite/_vti_bin/ReportServer
    We are migrating sp 2010 site to SP 2013 provider hosted app. we are using Report viewer control (version 10.0.0) in .net application app server, And the reporting service is configured in sharepoint site and report is uploaded in the document
    library. We are using claims based authentication
    ReportViewer1.ServerReport.ReportServerUrl =
    newUri("sharepointSite/_vti_bin/ReportServer");
    ReportViewer1.ServerReport.ReportPath = @"sharepointSite/_vti_bin/ReportServer?sharepointSite/Reports/Report1.rdl";
    and am getting an error
    ReportServerException: For more information about this error navigate to the report server on the local server machine, or enable remote errors]
    [ReportServerException: The user does not exist or is not unique.]
    [ReportServerException: Report Server has encountered a SharePoint error. (rsSharePointError)]
       Microsoft.Reporting.WebForms.ServerReportSoapProxy.OnSoapException(SoapException e) +82
       Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.ProxyMethodInvocation.Execute(RSExecutionConnection connection, ProxyMethod`1 initialMethod,
    ProxyMethod`1 retryMethod) +770
       Microsoft.Reporting.WebForms.ServerReport.EnsureExecutionSession() +105
       Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 parameters) +163
       BP.SDC.eXPP.UIAppsWeb.UserControls.Baseline.ProgressDashboard.RefreshDashboardReport(Int32 userRoadMapDisciplineId, String roadmapSection)
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804
    Can you please help me to solve this issue

    Hi,
    According to your post, my understanding is that you had issues about the provider hosted app.
    Per the error, the issue may be related to the permission issue.
    For a better troubleshooting, we can check with the following steps.
    To norrow down the issue, please create a new and clean app to test whether it has the same issue.
    You can check the ULS log to see if anything unexpected occurred when you deploy the app and open the site page.
    For SharePoint 2013, by default, ULS log is at
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS
    You can check the ULS log by the methods here:
    http://blogs.msdn.com/b/opal/archive/2009/12/22/uls-viewer-for-sharepoint-2010-troubleshooting.aspx
    http://msdn.microsoft.com/en-us/library/gg193966(v=office.14).aspx
    Thanks,
    Jason
    Forum 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]
    Jason Guo
    TechNet Community Support

  • Provider-hosted app deployment error

    Hi,
    I am developing a provider-hosted app which programmatically adds the app part on Home page of the site. I wrote the code for adding the app part in App Installed event. It works fine when i debug it on my development site. Then i made a catalog site and
    deployed it there following the instructions in this blog. 
    http://blogs.msdn.com/b/russmax/archive/2014/06/26/part-2-intro-to-provider-hosted-apps-develop-package-and-deploy.aspx
    After deploying the app on app catalog, when i try to add the app, i get the following error.
    Log Name:      Application
    Source:        Microsoft-SharePoint Products-SharePoint Foundation
    Date:          3/18/2015 5:44:17 PM
    Event ID:      8311
    Task Category: Topology
    Level:         Error
    Keywords:      
    User:          SP\Administrator
    Computer:      SP2013.SP2013.LOCAL
    Description:
    An operation failed because the following certificate has validation errors:
    Subject Name: CN=SP2013.SP2013.LOCAL
    Issuer Name: CN=SP2013.SP2013.LOCAL
    Thumbprint: 9D3D48F8D7ED5AE4CB187BEB3319C3E65A36340C
    Errors:
     SSL policy errors have been encountered.  Error code '0x2'..
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-SharePoint Products-SharePoint Foundation" Guid="{6FB7E0CD-52E7-47DD-997A-241563931FC2}" />
        <EventID>8311</EventID>
        <Version>15</Version>
        <Level>2</Level>
        <Task>13</Task>
        <Opcode>0</Opcode>
        <Keywords>0x4000000000000000</Keywords>
        <TimeCreated SystemTime="2015-03-18T12:44:17.912561500Z" />
        <EventRecordID>24215803</EventRecordID>
        <Correlation ActivityID="{3A58A90C-2A9C-4128-A4CF-D07A9FEB48E8}" />
        <Execution ProcessID="980" ThreadID="688" />
        <Channel>Application</Channel>
        <Computer>SP2013.SP2013.LOCAL</Computer>
        <Security UserID="S-1-5-21-2707663415-3900761612-1761970234-500" />
      </System>
      <EventData>
        <Data Name="string0">CN=SP2013.SP2013.LOCAL</Data>
        <Data Name="string1">CN=SP2013.SP2013.LOCAL</Data>
        <Data Name="string2">9D3D48F8D7ED5AE4CB187BEB3319C3E65A36340C</Data>
        <Data Name="string3">SSL policy errors have been encountered.  Error code '0x2'.</Data>
      </EventData>
    </Event>
    I am deploying the app with non-system user. Is there any any limitation of using app installed event in
    app catalog or am i doing something wrong?

    Hi,
    The following blog for you to check:
    SharePoint 2013 Domain Certificate for Provider-Host App Development Environment
    http://rwcchen.blogspot.com/2013/12/sharepoint-2013-domain-certificate-for.html
    Or try to add the following line within <system.net> tag
    in your SharePoint site web.config:
    <settings>
    <servicePointManager
    checkCertificateName="false"
    checkCertificateRevocationList="false"/>
    </settings>
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]
    Thanks for the reply but I already tried the solution. My app works fine when i deploy it without app install event receiver but when i add the event receiver i face the error. Is there any limitation of using app install event receivers?

  • SharePoint 2013 Provider-Hosted App Installs, throws File Exists error.

    I have a SP2013 Provider-hosted app with DevExpress controls that was working fine until just recently. I am getting the following error when I try to F5 DEBUG:
    "Error occurred in deployment step 'Install app for SharePoint': The file exists."
    The app actually installs and executes but the debugger detaches very quickly plus it is prompting with the nagging aforementioned message. There are no AppUninstall / AppInstall / AppUpgraded events being handled.
    Thanks in advance.

    I tried retraction, cleaning, reinstalling - nothing worked. I tried a new app in the site collection and a new app in a new site collection - still no luck. In the end the problem was more simple, but the "File exists" error was not helpful in determining
    the root cause. Perhaps others will hit this thread and find the solution helpful. Visual Studio will typically switch automatically to "Run as Administrator" mode whenever debugging a SP App for 2013. In my case, it wasn't. I had one or two existing Apps
    that never prompted me but ran fine and in this case, new apps weren't automatically running as the Administrator. After changing this behavior the app (and new apps) work as expected.

  • Retrieve data from a list in SharePoint 2013 provider hosted App using CSOM

    I have developed a provider hosted app in SharePoint 2013. As you already know, Visual Studio creates web application and SharePoint app. The web application gets hosted inside IIS and the SharePoint App in SharePoint site collection. I'm trying to get
    data from a list hosted in SharePoint using CSOM. But I get ran insecure content error. 
    here is my code in Default.aspx
        <script type="text/javascript" src="../Scripts/jquery-1.8.2.js"></script>
        <script type="text/javascript" src="../Scripts/MicrosoftAjax.js"></script>
        <script type="text/javascript" src="../Scripts/SP.Core.js"></script>
        <script type="text/javascript" src="../Scripts/INIT.JS"></script>
        <script type="text/javascript" src="../Scripts/SP.Runtime.js"></script>
        <script type="text/javascript" src="../Scripts/SP.js"></script>
        <script type="text/javascript" src="../Scripts/SP.RequestExecutor.js"></script>
        <script type="text/javascript" src="../Scripts/App.js"></script>
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head runat="server">
            <title></title>
        </head>
        <body>
            <form id="form1" runat="server">
            <div>
                <input id="Button1" type="button" value="Get title via CSOM" onclick="execCSOMTitleRequest()" /> <br />
                <input id="Button2" type="button" value="Get Lists via CSOM" onclick="execCSOMListRequest()" />
            </div>
                <p ID="lblResultTitle"></p><br />
                <p ID="lblResultLists"></p>
            </form>
        </body>
        </html>
    and App.js is:
        var hostwebUrl;
        var appwebUrl;
        // Load the required SharePoint libraries
        $(document).ready(function () {
            //Get the URI decoded URLs.
            hostwebUrl =
                decodeURIComponent(
                    getQueryStringParameter("SPHostUrl")
            appwebUrl =
                decodeURIComponent(
                    getQueryStringParameter("SPAppWebUrl")
            // resources are in URLs in the form:
            // web_url/_layouts/15/resource
            var scriptbase = hostwebUrl + "/_layouts/15/";
            // Load the js files and continue to the successHandler
            //$.getScript(scriptbase + "/MicrosoftAjax.js",
            //   function () {
            //       $.getScript(scriptbase + "SP.Core.js",
            //           function () {
            //               $.getScript(scriptbase + "INIT.JS",
            //                   function () {
            //                       $.getScript(scriptbase + "SP.Runtime.js",
            //                           function () {
            //                               $.getScript(scriptbase + "SP.js",
            //                                   function () { $.getScript(scriptbase + "SP.RequestExecutor.js", execCrossDomainRequest); }
        function execCrossDomainRequest() {
            alert("scripts loaded");
        function getQueryStringParameter(paramToRetrieve) {
            var params = document.URL.split("?")[1].split("&");
            var strParams = "";
            for (var i = 0; i < params.length; i = i + 1) {
                var singleParam = params[i].split("=");
                if (singleParam[0] == paramToRetrieve)
                    return singleParam[1];
        function execCSOMTitleRequest() {
            var context;
            var factory;
            var appContextSite;
            var collList;
            //Get the client context of the AppWebUrl
            context = new SP.ClientContext(appwebUrl);
            //Get the ProxyWebRequestExecutorFactory
            factory = new SP.ProxyWebRequestExecutorFactory(appwebUrl);
            //Assign the factory to the client context.
            context.set_webRequestExecutorFactory(factory);
            //Get the app context of the Host Web using the client context of the Application.
            appContextSite = new SP.AppContextSite(context, hostwebUrl);
            //Get the Web
            this.web = context.get_web();
            //Load Web.
            context.load(this.web);
            context.executeQueryAsync(
                Function.createDelegate(this, successTitleHandlerCSOM),
                Function.createDelegate(this, errorTitleHandlerCSOM)
            //success Title
            function successTitleHandlerCSOM(data) {
                $('#lblResultTitle').html("<b>Via CSOM the title is:</b> " + this.web.get_title());
            //Error Title
            function errorTitleHandlerCSOM(data, errorCode, errorMessage) {
                $('#lblResultLists').html("Could not complete CSOM call: " + errorMessage);
        function execCSOMListRequest() {
            var context;
            var factory;
            var appContextSite;
            var collList;
            //Get the client context of the AppWebUrl
            context = new SP.ClientContext(appwebUrl);
            //Get the ProxyWebRequestExecutorFactory
            factory = new SP.ProxyWebRequestExecutorFactory(appwebUrl);
            //Assign the factory to the client context.
            context.set_webRequestExecutorFactory(factory);
            //Get the app context of the Host Web using the client context of the Application.
            appContextSite = new SP.AppContextSite(context, hostwebUrl);
            //Get the Web
            this.web = context.get_web();
            // Get the Web lists.
            collList = this.web.get_lists();
            //Load Lists.
            context.load(collList);
            context.executeQueryAsync(
                Function.createDelegate(this, successListHandlerCSOM),
                Function.createDelegate(this, errorListHandlerCSOM)
            //Success Lists
            function successListHandlerCSOM() {
                var listEnumerator = collList.getEnumerator();
                $('#lblResultLists').html("<b>Via CSOM the lists are:</b><br/>");
                while (listEnumerator.moveNext()) {
                    var oList = listEnumerator.get_current();
                    $('#lblResultLists').append(oList.get_title() + " (" + oList.get_itemCount() + ")<br/>");
            //Error Lists
            function errorListHandlerCSOM(data, errorCode, errorMessage) {
                $('#lblResultLists').html("Could not complete CSOM Call: " + errorMessage);
    Any solution is appreciated.

    Hi,
    To retrieve data from list in your provider-hosted app using SharePoint Client Object Model(CSOM), you can follow the links below for a quick start:
    http://msdn.microsoft.com/en-us/library/office/fp142381(v=office.15).aspx
    http://blogs.msdn.com/b/steve_fox/archive/2013/02/22/building-your-first-provider-hosted-app-for-sharepoint-part-2.aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • The remote server returned an error :(401) unauthorized in Provider hosted app deployment

    Hi,
    We are trying to deploy the provider hosted app in server environment . we are getting the "The remote server returned an error :(401) unauthorized" error after deploy the app in server.
    stack Trace:
    [webException:Te remote server returned an error:(401) UnAuthorized.]
    System.Net.HeepWebRequest.GetResponse().
    Followed the same MSDN steps , but sill same error. We have attached the certificate and using the same issuer ID in the app web.config.
    Verified the IIS setting and still getting the same error when we call the "Clientcontext.ExecuteQuery()" method.
    Same code is working fine in my Local dev environment.
    If anyone have idea about this issue, please let me know.
    Thank you,
    Mylsamy

    Hi ,Thank you for your response. We have tried all the options and everything is same (Client ID,Issuer ID...etc) and finally figured out the issue.The below link saved my day.http://msdn.microsoft.com/en-us/library/office/dn762439(v=office.15).aspxIn "TokenHelper.cs" GetRealmFromTargetUrl method always return null andWhen we analyze the issue we found some variable name assigned for "Realm" Instead of GUID in SP server.Power shell command to get the Realm in SP server:  Get-SPAuthenticationRealmWe have followed below article to generate the new GUID for realm.http://technet.microsoft.com/en-us/library/jj219756(v=office.15).aspx$c =Get-SPServiceContext -Site "http://<websiteurl>"Set-SPAuthenticationRealm -ServiceContext $c -Realm "a686d436-9f16-42db-09b7-cb578e110ccd".
    Thankyou,Mylsamy

  • SharePoint remote provider hosted apps - confusion around key questions

    For some time, I have been trying to get a provider hosted app setup to work, and I am afraid that I - as a relative novice - must have missed some key points despite hours of googling and reading. Here's my questions:
    A remote, provider hosted app, would have its AppWeb in a domain that is different from the host SharePoint Farm in which it is gets installed and used. In other words, the AppWeb may be located at remote.contoso-apps.com, where as the SharePoint farm uses
    for instance spslocal.mycorp.com. However, when you - in the SharePoint host farm - set up your App Domain/App isolation - you can only provide one value - which in this case would then need to be remote.contoso-apps.com??? Does that mean that each SharePoint
    Farm can only contain Apps from one vendor delivering remote apps? Or is the key in hard coding the app web in the manifest? (However, even if I've tried this it seems like the token SPAppWebUrl still translates into the pattern defined in the App Isolation
    Settings in the host farm???).
    Back to the AppWeb: Many bloggers have mentioned that you have to add some kind of SharePoint element to your App project (not the Web Project part) to get the AppWeb provisioned from Visual Studio 2013. But at what stage are these SharePoint elements actually
    provisioned - during some kind of publish operation of the Web Project part (the Pages, Scripts etc.) or when you install the app package (hardly the latter, since the first installation may be when a customer installs the app???). The reason I ask is (of
    course) that my SharePoint Elements do not seem to get provisioned. And just to test my very basic understanding: the AppWeb can be any pure IIS web site from the start - i.e., not a SharePoint Web App?
    Thanks for any help on these challenging issues!

    Paul,
    thanks for your effort, but unfortunately the answers do not get me much further.
    Question 1: You write "You can only use one domain, because cross-domain IFrame requests are blocked in SharePoint 2013". This is contrary to numerous other articles that explain how the SharePoint cross-domain library (SP.RequestExecutor.js) can be
    used to communicate across domains. From the outset, the whole idea about an AppWeb is - according to Microsoft documentation - that the AppWeb should be isolated from the HostWeb and therefore in a separate domain. 
    This article,
    http://msdn.microsoft.com/en-us/library/office/jj612823(v=office.15).aspx, even talks about scenarios where the SharePoint Host Web and App Web are in different security zones!
    So according to a load of other documentation it is indeeed a valid scenario I am addressing, but I still miss the key answers to the questions above. I suspect that the key is to hardcode certain URIs in your app that points to the cloud AppWeb
    (so the single App Domain specified in the Host Farm is not used at all), but I have failed to find the necessary documentation on this.
    Question 2: The article mentioned does not talk about the issues that I have asked about, specifically when the SharePoint elements in the App are created.
    Anyone with experience in this area? Thanks!

  • Getting Client Context in Class Library for Sharepoint 2013 provider hosted app

    I have created an MVC Provider hosted app.
    From my controllers I can easily get the client context via:
    var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);
    But in my layout page, I have a call that gets the topnavbar and replicates it:
    @foreach (var nav in HostHelper.GetNav(this))
    <li class='static'>
    <a class='static menu-item ms-core-listMenu-item ms-displayInline ms-navedit-linkNode' href='@nav.Url'>
    <span class='addition-background ms-navedit flyoutArrow'>
                                                            <span class='menu-item-text'>
    @nav.Title                                                
    </span>                                                   </span>                                               
    </a>                                           
    </li>                                       
    This causes an error because I am not sure how to get the clientcontext from my class. I have tried:
    public static NavigationNodeCollection GetNav()       
    var spContext = SharePointContextProvider.Current.GetSharePointContext(System.Web.HttpContext.Current);
    using (var clientContext = spContext.CreateUserClientContextForSPHost())
    if (clientContext != null)
    NavigationNodeCollection topNav = clientContext.Web.Navigation.TopNavigationBar;            
    clientContext.Load(topNav);                   
    clientContext.ExecuteQuery();                   
    return topNav;                                       }           
    return null;       
    put it doesnt get the client context

    Hi,
    According to your description,  my understanding is that you want to get SharePoint provider hosted app ClientContext in the layout page.
    In the layout page, it needs to use TokenHelper Class to get access token and then retrieve the ClientContext.
    Here is a detailed article for your reference:
    How to Get SharePoint Client Context in SharePoint Apps (Provider Hosted / SharePoint Access ) in CSOM (Client Side Object Model)
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Cryptographic error on a SharePoint 2013 Provider Hosted App

    Below mentioned is the error:
    System.TypeInitializationException: The type initializer for 'ABABABA.TokenHelper' threw an exception. ---> System.Security.Cryptography.CryptographicException: Access denied. at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32
    hr) at System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx) at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String
    fileName, Object password, X509KeyStorageFlags keyStorageFlags) at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password)
    We are pretty sure the App Pool account has access to the file and the path is correct. We have had a dozen number of people who checked these things out.
    Please help out.
    Thanks,
    Aseem Sood

    Hi Aseem,
    Please check the App pool account password and re-enter it once again in advanced settings.
    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

  • Error with Provider Hosted App on Edit Form of a list item

    We have an error on the Edit Form of one of our pages.
    We have developed a SharePoint Online Provider Hosted app which replaces the standard edit form of a list item and has some further events behind the save button. Since this is rather new territory for us, we're using a roundabout way of achieving this by
    using a script editor web part to display an iFrame of our app. That way we can pass the Url through to our app and retrieve query strings from them.
    Our issue comes quite intermittently in that we sometimes get a "web page cannot be found" error or sometimes a "resource cannot be found" error, however, when we load another app on the site (from the same app project, but using an app
    part), then go back to the Edit Form, the information in the iFrame suddenly renders.
    Any ideas on what might be causing this issue at all? Ideally, we should be rendering the app to the Edit Form is the proper manner, rather than scripting an iFrame that points to out app in Azure. Would this be the cause of the problem?
    Thanks
    Tom

    Hi thumper, if you have access to InfoPath, you can add the form to a page using the InfoPath web part. Otherwise, use SP Designer with instructions below:
    http://sharepoint.stackexchange.com/questions/70287/display-new-form-of-a-list-in-a-web-part-page
    cameron rautmann

  • Creating High trust provider hosted app in SharePoint online

    Hi,
    I need to create high trust provider hosted app for SharePoint Online. provider hosted would be not going to host in Azure but it will be some where else.
    some kindly provide step by step that how to create High trust app for SharePoint online but not for SharePoint 2013.
    Kaps

    check this link
    http://msdn.microsoft.com/en-us/library/office/fp179901(v=office.15).aspx#Intro
    A high-trust app for SharePoint is is primarily intended for use in an on-premises environment. The high-trust
    app cannot be installed to Microsoft SharePoint Online, and the remote components are typically installed on premises, too, within the corporate firewall. Thus, the instances of the app for SharePoint are specific to each individual company.
    Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation

  • SharePoint 2013 On premises provider hosted app - Logged in user info

    As per my understanding, following scenario is not possible in a provided hosted app deployed for SharePoint 2013 on-premises.
    1) User clicks the button of app on a SharePoint Site. Remote Web app page opens
    2) Remote app page shows the message "Welcome [User Name]" (without authenticating user again)
    3) If that user has contributor permissions in originating SharePoint site, the app should display "Welcome Contributor" otherwise it should display "Welcome Visitor"
    Please let me know if above functionality could be achieved?
    Hammad Arif EPM Advice Blog

    Hi,
    According to your description,my understanding is that you want to show user information when clicking  the app without asking credentials .
    By default, SharePoint Provider hosted app is hosted outside SharePoint web application, so it needs credentials to get OAuth. 
    I suggest you can use SharePoint hosted app, it hosted at the same web application as SharePoint, then when you click the app, it will get the current logged in user without  without asking credentials.
    Here are some detailed articles for your reference:
    Choose patterns for developing and hosting your app for SharePoint
    How to: Create a basic SharePoint-hosted app
    How to Check User permission for the web, list or SharePoint Item in SharePoint JavaScript Object Model
    Thanks
    Best Regards,
    Jerry Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • WLS 8.1 JAX-RPC stubs and SSL

    I am part of an industry effort to assess WS interop. We have created a common WSDL that will be implemented in WAS, .NET and WLS 8.1. As part of this effort, we are also trying to use two-way SSL authentication. However, I have not found a way to co

  • Directory structure mirroring

    I have my mp3:s neatly organized in a directory structure on my disk. There's where I'd like to add and remove albums, and would like the itunes music library to automatically update when I make changes. I.e. if I add albums on my disk, I'd like them

  • Your credit card information does not match your bank's records

    I just purchase iphone 5c, and I made my iturne account, in order to downloan the app I have to put my payment information. But always shows " your credit card payment information doesn't match your bank's records". and I tried three different card s

  • The Specified name is already in use while activating Publishing feature at site collection level in Moss2007

    Hi, Please suggest on this "The Specified name is already in use while activating Publishing feature at site collection level in Moss2007" The specified name is already in use. A list, survey, discussion board, or document library cannot have the sam

  • Database in Raw device recover in time tablespace

    How recover database in raw device using clone database (Recovery Manager) ? The problem is follow: When RMAN begin then recover proces he need create the clone database. @ How create this database ? @ In file system or raw device ? if he create it i