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?
Similar Messages
-
Provider Hosted app server error
Hello All,
I had created a provider hosted app with remote web app deployed in the same IIS server where sharepoint installed. I have used selfsigned certificates for trust. It works if i use visual studio IIS express to host remote web app.
But when I use Local IIS for hosting the web app, I am getting the following error. httpContext.Session[SPContextKey] is always null
Any help will be appreciated.
VishnuCheck if below can help
http://sharepoint.stackexchange.com/questions/95151/provider-hosted-app-server-error
http://blogs.msdn.com/b/kaevans/archive/2013/09/24/introducing-sharepointcontext-for-provider-hosted-sharepoint-apps.aspx
http://blogs.msdn.com/b/officeapps/archive/2013/11/07/announcing-the-new-sharepointcontext-helper-in-apps-for-sharepoint-2013.aspx -
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,
MylsamyHi ,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 -
Hi,
Any help appreciated!!
I'm getting this error: "The remote server returned an error: (401) unauthorised when I debug a provider-hosted app. I get the error on this line:
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
See code below
I created a high trust development environment following the instructions provided here:
http://msdn.microsoft.com/en-us/library/office/fp179901(v=office.15).aspx and
http://msdn.microsoft.com/library/office/fp179923
I created a provider-hosted app with the intent to:
create a SharePoint list in the appweb
Use self-signed certificate, tokenhepler.cs and sharepointcontext.cs to retrieve current user context and access on SharePoint. (No changes were made to tokenhelper.cs and sharepointcontext.cs)
retrieve list items from the SharePoint list in a button click event handler on a default.aspx of the remote web
What happens:
The app is deployed successfully to the Dev site
The SharePoint feature is deployed and activated
The default.aspx page of the remote web loads
The error (see image) is returned on clicking of the button
My environment is an on-premise SharePoint 2013 with AD and my dev box is standalone windows 8.1 running Visual Studio Professional 2013 Update 3.
The code block below is a copy of the default.aspx code-behind
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.SharePoint.Client;
using Microsoft.IdentityModel.S2S.Tokens;
using System.Net;
using System.IO;
using System.Xml;
using System.Data;
using System.Xml.Linq;
using System.Xml.XPath;
namespace Idea.GeneratorWeb
public partial class Default : System.Web.UI.Page
SharePointContextToken contextToken;
string accessToken;
Uri sharepointUrl;
protected void Page_PreInit(object sender, EventArgs e)
Uri redirectUrl;
switch (SharePointContextProvider.CheckRedirectionStatus(Context, out redirectUrl))
case RedirectionStatus.Ok:
return;
case RedirectionStatus.ShouldRedirect:
Response.Redirect(redirectUrl.AbsoluteUri, endResponse: true);
break;
case RedirectionStatus.CanNotRedirect:
Response.Write("An error occurred while processing your request.");
Response.End();
break;
protected void Page_Load(object sender, EventArgs e)
//// The following code gets the client context and Title property by using TokenHelper.
//// To access other properties, the app may need to request permissions on the host web.
var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);
//var spContext = new ClientContext("MySPDevInstance");
//spContext.Credentials = new NetworkCredential("username", "password");
//using (var clientContext = spContext.CreateUserClientContextForSPHost())
// clientContext.Load(clientContext.Web, web => web.Title);
// clientContext.ExecuteQuery();
// Response.Write(clientContext.Web.Title);
string contextTokenString = TokenHelper.GetContextTokenFromRequest(Request);
if (contextTokenString != null)
// Get context token
contextToken = TokenHelper.ReadAndValidateContextToken(contextTokenString, Request.Url.Authority);
// Get access token
sharepointUrl = new Uri(Request.QueryString["SPAppWebUrl"]);
accessToken = TokenHelper.GetAccessToken(contextToken, sharepointUrl.Authority).AccessToken;
// Pass the access token to the button event handler.
Button1.CommandArgument = accessToken;
protected void Button1_Click(object sender, EventArgs e)
// Retrieve the access token that the Page_Load method stored
// in the button's command argument.
string accessToken = ((Button)sender).CommandArgument;
if (IsPostBack)
sharepointUrl = new Uri(Request.QueryString["SPAppWebUrl"]);
// REST/OData URL section
string oDataUrl = "/_api/Web/lists/getbytitle('Diagrams In Idea Generator')/items?$select=Title,Diagram,SharingStatus";
// HTTP Request and Response construction section
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(sharepointUrl.ToString() + oDataUrl);
request.Method = "GET";
request.Accept = "application/atom+xml";
request.ContentType = "application/atom+xml;type=entry";
request.Headers.Add("Authorization", "Bearer " + accessToken);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
// Response markup parsing section
XDocument oDataXML = XDocument.Load(response.GetResponseStream(), LoadOptions.None);
XNamespace atom = "http://www.w3.org/2005/Atom";
XNamespace d = "http://schemas.microsoft.com/ado/2007/08/dataservices";
XNamespace m = "http://schemas.microsoft.com/ado/2007/08/dataservices/metadata";
List<XElement> entries = oDataXML.Descendants(atom + "entry")
.Elements(atom + "content")
.Elements(m + "properties")
.ToList();
var entryFieldValues = from entry in entries
select new
Character = entry.Element(d + "Title").Value,
Actor = entry.Element(d + "Diagram").Value,
CastingStatus = entry.Element(d + "SharingStatus").Value
GridView1.DataSource = entryFieldValues;
GridView1.DataBind();
Any ideas what I might be doing wrongHi ,
Use the below code
Public string GetAccessToken(){
string sharePointSiteUrlHost = Page.Request["SPHostUrl"].Tostring();
string AccessToken = tokenHelper.GetS2SAccessTokenWithWindowsIdentity(sharePointSiteUrlHost, Request.LogonUserIdentity);
return accessToken;
Than initialize the ClientCOntext with the below Method
private static ClientContext GetClientContextWithAccessTokenString(string targetUrl, object accessToken)
ClientContext clientContext = new ClientContext(targetUrl);
clientContext.AuthenticationMode = ClientAuthenticationMode.Anonymous;
clientContext.FormDigestHandlingEnabled = false;
clientContext.ExecutingWebRequest +=
delegate(object oSender, WebRequestEventArgs webRequestEventArgs)
webRequestEventArgs.WebRequestExecutor.WebRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
webRequestEventArgs.WebRequestExecutor.RequestHeaders["Authorization"] =
"Bearer " + accessToken;
return clientContext;
use this clientCOntext and it will work.
Do not use
SharePointContextProvider
Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer -
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 withanageHi 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 -
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,
DevenBelow 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. -
Sharepoint Provider hosted app installation error - There is no Workflow App Part registered
Hello,
I am getting below error when i run my share point app(Provider hosted) from visual studio 2013.It has a list workflow.
Error 1
Error occurred in deployment step 'Install app for SharePoint': There is no Workflow App Part registered.
0 0
SharePointApp
Thanks
SobersHi,
According to the error message, your environment might not have the deployment group for the workflow registered.
You can register the deployment group using PowerShell with the code provided by Andrew in the link below and do the test again:
http://www.andrewconnell.com/blog/Workflow-Improvements-Changes-SP2013-March-PU-and-RTM-Developer-Tools#XgQAmUFIZm8a5cjm.99
Feel free to reply with the test result if the issue still exists.
Best regards
Patrick Liang
TechNet Community Support -
I have Provider Hosted App - Deployed in Azure and Hosted in Office 365.
Deployed successfully on azure after attaching publishing profile of azure.
Now I wish to debug app in local?Hi,
According to your post, my understanding is that you want to debug SharePoint provider hosted app in local.
Per the previous thread, to debug SharePoint provider hosted app in local, we should configure S2S authentication.
You can follow the article below to build the high trust app, then you can debug the app locally.
http://blog.karstein-consulting.com/2013/01/08/create-provider-hosted-high-trust-app-for-sharepoint-2013-short-guide/
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
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 BlogHi,
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] -
Error occurred in deployment step 'Install app for SharePoint, ULS log as below:
0x0BA8 SharePoint Foundation App Deployment acjjg Medium The current user has System.Threading.Thread.CurrentPrincipal.Identity.Name
= 0#.w|perf\abraham.lincoln, System.Security.Principal.WindowsIdentity.GetCurrent().Name = NT AUTHORITY\IUSR, System.Web.HttpContext.Current.User.Identity.Name = 0#.w|perf\abraham.lincoln. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.39 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ag8d6 Medium SPApp: CreateAppUsingPackageMetadata: isCabStream is false. Treating the stream as a ZIP. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.39 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ahkn9 High Deleting App with fingerprint TJQrYuD5N+kEe38LZtl6wSs3Ak3yYvWcmwuNLTqtpdFzb4qSMopN3SWCRdWvntrKoM7qIS2S2llpA5omi8iHqQ==
on site 264dc389-d394-4985-a43c-ad91a383c0df dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.39 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ahkob High The App with fingerprint TJQrYuD5N+kEe38LZtl6wSs3Ak3yYvWcmwuNLTqtpdFzb4qSMopN3SWCRdWvntrKoM7qIS2S2llpA5omi8iHqQ==
on site 264dc389-d394-4985-a43c-ad91a383c0df was to be deleted, but it did not exist dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment abnqa Medium App Packaging: CreatePackage: There are 10 parts in the package. There are 1 package-part relationships
in the package. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment afyz6 Medium SPAppResources: ParseResources: No default resource file was found. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment afyzx Medium SPAppResources: ParseResources: no resource file relationships were found. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment aebgs Medium SPPackageUtility: ExtractPart: Creating directory 'C:\Users\abraham.lincoln.PERF\AppData\Local\Temp\71345ca6-3565-43d8-9017-2d3336965d8f\extract' dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment aebgt Medium SPPackageUtility: ExtractPart: Creating file 'C:\Users\abraham.lincoln.PERF\AppData\Local\Temp\71345ca6-3565-43d8-9017-2d3336965d8f\extract\AppManifest.xml' dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajddw Medium SPPackageUtility: ExtractPart: Part stream length is '1072'. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajddz Medium SPPackageUtility: ExtractPart: Length is '1072', not locking before copying the stream. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment aebgt Medium SPPackageUtility: ExtractPart: Creating file 'C:\Users\abraham.lincoln.PERF\AppData\Local\Temp\71345ca6-3565-43d8-9017-2d3336965d8f\extract\AppIcon.png' dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajddw Medium SPPackageUtility: ExtractPart: Part stream length is '3540'. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajddz Medium SPPackageUtility: ExtractPart: Length is '3540', not locking before copying the stream. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.41 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment aidi7 Medium SPIconAppPartValidator: IsSupportedFormat: image raw format is 'b96b3caf-0728-11d3-9d7b-0000f81ef32e'. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment afyz6 Medium SPAppResources: ParseResources: No default resource file was found. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment afyzx Medium SPAppResources: ParseResources: no resource file relationships were found. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment aebgt Medium SPPackageUtility: ExtractPart: Creating file 'C:\Users\abraham.lincoln.PERF\AppData\Local\Temp\71345ca6-3565-43d8-9017-2d3336965d8f\extract\featurecc1deab7-efdf-4cc2-80ae-60e073577d64.xml' dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajddw Medium SPPackageUtility: ExtractPart: Part stream length is '321'. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajddz Medium SPPackageUtility: ExtractPart: Length is '321', not locking before copying the stream. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment aebgt Medium SPPackageUtility: ExtractPart: Creating file 'C:\Users\abraham.lincoln.PERF\AppData\Local\Temp\71345ca6-3565-43d8-9017-2d3336965d8f\extract\elements4d87f314-4b0a-4b89-8a7e-9cb73c99f25f.xml' dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajddw Medium SPPackageUtility: ExtractPart: Part stream length is '849'. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajddz Medium SPPackageUtility: ExtractPart: Length is '849', not locking before copying the stream. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment aerhy Medium App Packaging - List of App Parts (count ='2'): Name='SPIconAppPart',Name='SPFeatureAppPart', dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment aerhz Medium App Packaging - List of Deployment Groups (count ='3'): Name='SPIconDeploymentGroup',Name='SPTargetWebDeploymentGroup',Name='SPQuickLaunchDeploymentGroup', dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.42 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment mq71 Medium Creating App with fingerprint TJQrYuD5N+kEe38LZtl6wSs3Ak3yYvWcmwuNLTqtpdFzb4qSMopN3SWCRdWvntrKoM7qIS2S2llpA5omi8iHqQ==
to site 264dc389-d394-4985-a43c-ad91a383c0df. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.44 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment afpd2 Medium Committing package with fingerprint TJQrYuD5N+kEe38LZtl6wSs3Ak3yYvWcmwuNLTqtpdFzb4qSMopN3SWCRdWvntrKoM7qIS2S2llpA5omi8iHqQ==
and data length 8010 to site 264dc389-d394-4985-a43c-ad91a383c0df. dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.46 w3wp.exe (0x2170) 0x0BA8 SharePoint Foundation
App Deployment ajk9e Medium Writing 8010 bytes to database for app with fingerprint TJQrYuD5N+kEe38LZtl6wSs3Ak3yYvWcmwuNLTqtpdFzb4qSMopN3SWCRdWvntrKoM7qIS2S2llpA5omi8iHqQ== dcf1d59c-94c5-5071-47bf-07cd3f2ead95
12/14/2014 23:54:27.50 w3wp.exe (0x2170)Hi Jerry,
I agree with Nikhil, I think you have posted partial ULS log, we could not find effective errors for the issue.
For Provider Hosted app in SharePoint server on-premise,
the TokenHelper class will try to access your Azure Security Principle by default.
Did you have a valid Azure account?
If not, the issue may be caused that you don't have a valid account, to resolve this issue, you can use
a valid Azure account or not going to use Azure Platform for hosting the app as the article
below.
http://pratapreddypilaka.blogspot.jp/2012/12/sharepoint-2013-avoiding-azure-on-dev.html
Thanks,
Jason
Jason Guo
TechNet Community Support -
Hello all,
Could you possibly help me with provider-hosted app development/deployment process.
We developed SharePoint provider-hosted app that works just fine in development environment. Now we need to automate it's installation in test environment via powershell.
In AppManifest.xml that we are deploying we have key instead of explicit URL:
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" Name="ShowAllRoomsApp" ProductID="{922a18aa-5592-b59a-4da9-4791baef02e7}" Version="1.0.0.0"
SharePointMinVersion="15.0.0.0">
<Properties>
<Title>SomeTitle</Title>
<StartPage>~remoteAppUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
If we use as
https://technet.microsoft.com/en-us/library/jj655398.aspx recommends, we cannot specify Redirect Url as we can do this on
/_layouts/appinv.aspx
So now it seems like the only way to deploy this kind of solution is using appinv.aspx page.Or must we apply this URL in AppManifest on developing stage in Visual Studio?
What did I miss?
P. S. Even if I use /_layouts/appinv.aspx after powershell commandlets, I get error.hi,
to deploy provider hosted app you need 2 things
1. Client ID
2. Redirect URL.
What you can do you can generate app from visual studio using clientID and URL from developer enviornment.
Now a app file is just a simple compressed zip file if you rename it as .zip and extract you will find AppManifest
inside it. So to create an app for Testing enviornment what you have to to Get the CLient ID (from AppRegNew.aspx) in testing enviornment. Unzip .App file change the AppManifest with testing client ID and URL than again zip file and rename as .app.
Now if you upload this file it will work.
To automate this scenerio i have created a simple windows Application in which i Pass the Client ID and StartURl and an App File it unzips the app file make changes to app and again zip it.
public static class AppPackageHelper
public const string StartUrlExpression = "{0}?{1}";
public const string StandardToken = "{StandardTokens}";
public static string Publish(string appPath, string ClientId,string StartUrl)
string tempDir = string.Empty;
string outPutFile = string.Empty;
try
string parentDir = System.IO.Path.GetDirectoryName(appPath);
outPutFile = System.IO.Path.Combine(parentDir, ClientId + "-Winshuttle.app");
tempDir = System.IO.Path.Combine(parentDir, ClientId.ToString());
Directory.CreateDirectory(tempDir);
int lastInd = appPath.LastIndexOf('.');
string tempPath = string.Empty;
string targetFilePath = string.Empty;
string cabPath = System.IO.Path.Combine(tempDir, System.IO.Path.GetFileNameWithoutExtension(appPath) + ".cab");
FileInfo fInfo = new FileInfo(appPath) { IsReadOnly = false };
File.Copy(appPath, cabPath);
XDocument doc = null;
string appManifest = string.Empty;
using (ZipArchive zipArch = ZipFile.Open(cabPath, ZipArchiveMode.Update))
appManifest = string.Format(@"{0}\AppManifest.xml", Directory.GetParent(cabPath).FullName);
ZipArchiveEntry manifestEntry = zipArch.Entries.LastOrDefault(e => e.Name.ToLower() == "appmanifest.xml");
manifestEntry.ExtractToFile(appManifest);
doc = XDocument.Load(appManifest);
XNamespace ns = doc.Root.GetDefaultNamespace();
string defaultUrl = string.Format(StartUrlExpression, StartUrl.TrimEnd('/'), StandardToken);
doc.Descendants(XName.Get("StartPage", ns.NamespaceName)).First().Value = defaultUrl;
doc.Descendants(XName.Get("RemoteWebApplication", ns.NamespaceName)).First().Attribute(XName.Get("ClientId")).Value = setupInfo.ClientId.ToString();
doc.Save(appManifest);
if (manifestEntry != null)
manifestEntry.Delete();
zipArch.CreateEntryFromFile(appManifest, "AppManifest.xml");
int totEnt = zipArch.Entries.Count;
for (int e = 0; e < totEnt; e++)
if (zipArch.Entries[e].Open().Length == 0)
//if (zipArch.Entries.Count > totEnt && e >= totEnt) break;
//zipArch.CreateEntry(zipArch.Entries[e].FullName);
File.Delete(appManifest);
if (File.Exists(outPutFile))
File.Delete(outPutFile);
File.Move(cabPath, outPutFile);
return outPutFile;
catch
throw;
finally
if (System.IO.Directory.Exists(tempDir))
System.IO.Directory.Delete(tempDir, true);
return outPutFile;
using System.IO.Compression.FileSystem.dll.
Also if you want to do it using powershell You need to do the same thing unzip-> changes values-> zip
So basic thing is You need to ahve only valid AppManifest file which contains 2 valid values Client Id and StartUrl
if you changes it inside appmanifest manuall than it will also work. Using above code you can create a console Application to do it. You can use powershell it just that i dont know how to zip unzip in powershell but i am pretty sure you can easily find it
on searching.
Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer -
Unable to deploy the provider hosted app on sharepoint server !!!
Hello,
I have simply created the provider hosted app by assigning the issuer ID !
Now, the SharePoint version of the app project is set as SharePoint Online.
However, when I deploy this project to SharePoint site, it shows following error :
Unknown SharePoint version: 16.0
In order to resolve this I changed the SharePoint version as SharePoint 2013
of the app project.
Though , I am getting following error on deployment:
The target version of the SharePoint site is 15.0.4569.1000, which is lower than the minimum supported SharePoint version of the app. To fix this, go to the SharePoint tab on the app for SharePoint project’s properties page, and change the Target
SharePoint Version property to the version of the SharePoint site or lower.
Would you please let me know how can I resolve this deployment error ?
Note : I am using MVC web Application template for web project
Thank you in advance.
Kind Regards,
Dipti ChhatrapatiNot sure, but this is straight.
Project type - apps for sharepoint --> Enter URL --> select type as provider hosted app --> MVC --> Authentication Option.
Now when publishing the project - SP App to SharePoint/Office Store and web portion to any web server ( i generally do it in Azure).
Thanks, Ashish | Please mark a post helpful/answer if it is helpful or answer your query. -
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. -
Provider hosted app installed on SharePoint 2013 on premises is returning internal 500 error !
Hello,
I have deployed the basic provider hosted app on sharepoint 2013 on premises.
However when I try to run the app, its throwing an error on following as mentioned in screen:
It seems an authentication issue, would you please tell me how can I resolve it ?
Thank you in advance.
Kind Regards,
Dipti ChhatrapatiHi,
According to your description, my understanding is that when you run provider hosted app in SharePoint 2013 on premise, the app occurs internal 500 error.
For using Managed .NET Client Object Model in Provider hosted app, it will need
TokenHelper.cs to get the ClientContext object like below:
private void RetrieveWithCSOM(string accessToken)
if (IsPostBack)
sharepointUrl = new Uri(Request.QueryString["SPHostUrl"]);
ClientContext clientContext =
TokenHelper.GetClientContextWithAccessToken(
sharepointUrl.ToString(), accessToken);
//Load the properties for the web object.
Web web = clientContext.Web;
clientContext.Load(web);
clientContext.ExecuteQuery();
//Get the site name.
siteName = web.Title;
//Get the current user.
clientContext.Load(web.CurrentUser);
clientContext.ExecuteQuery();
currentUser = clientContext.Web.CurrentUser.LoginName;
//Load the lists from the Web object.
ListCollection lists = web.Lists;
clientContext.Load<ListCollection>(lists);
clientContext.ExecuteQuery();
//Load the current users from the Web object.
UserCollection users = web.SiteUsers;
clientContext.Load<UserCollection>(users);
clientContext.ExecuteQuery();
foreach (User siteUser in users)
listOfUsers.Add(siteUser.LoginName);
foreach (List list in lists)
listOfLists.Add(list.Title);
More information:
https://msdn.microsoft.com/en-us/library/office/fp142381.aspx
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] -
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
TomHi 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
Maybe you are looking for
-
Hello, Is there a way to show a pdf (I already have the the byte[] for the document) in a new window or prompt the user for download when entering on a taskflow. We already have it working using on a button with af:fileDownloadActionListener but we n
-
Receiving a message encoded in SOAP
Hi all. I have an application that sends objects encoded with SOAP to various clients. This is not done via a web service, but a standalone application. Now I want to receive these SOAP messages with a java client and use the methods of the Classes d
-
I have created a flash website... on the first page i want to enter a simple motion tween movie( i imported it)... i can do that but it keeps looping... i unchecked Loop in html and added stop(); in the last keyframe but still the movie loops any ide
-
Shutting down oracle personal edition
hi all, I am using oracle 10g personal edition, with configuration Hp pavilion Laptop p4, 60GB, 512MB ram. The file oracle.exe is using over 125MB of memory so i want a way to startup and shutdown oracle (I know that on enterprise ed but not on perso
-
Building an executable with .vits with Labview 2011
Howdy Forum, I've recently adopted some code that dynamically calls two different .vits, one that parses (and displays data), and another that is used for logging this data. While developing, it runs fine and dandy. If compiled and not moved from