Creating and deploying provider hosted apps to SharePoint Online step by step


ok, i'm trying create new provider hosted app , deploy sharepoint online (office365).
managed right once, i'm not quite sure how , other attempts since have not been successful far.

to clarify - using vs2013 november 2014 update, azure sdk 2.5 , ms office developer tools november 2014 update.

i using ootb app based on asp.net web forms absolutely no code changes.

steps took far:

1. create new sp app project, based on asp.net web forms template

2. make sure can debug app against office365 url of developer site (that's site use development)

3. create website in azure , publish web project azure

4. right-click app project, click publish, click edit profile , populate client id , client secret

5. package app

6. in azure update app settings of website include used client id , client secret

7. create app catalog if don't have one

8. upload app file app catalog

9. in team site (that's site want deploy app once it's completed) go site contents , add app


result - app installed, trying open results in "an error occurred while processing request", caused sharepointcontextprovider.checkredirectionstatus returning redirectionstatus.cannotredirect.
- calling spcontext.createuserclientcontextforsphost() returns null.


question - missing?
app works correctly in debug mode on developer site.


i know articles specify have register app on _layouts/15/appregnew.aspx, (correct me if i'm wrong) required developer sites, , want deploy app team site.

however if try register app using used client id, client secret, name , domain error saying: unexpected error has occurred.

update: following same steps app based on mvc.net template (again - pure ootb code, no changes) has same result - app works in debug mode on developer site, doesn't work after adding app catalog , installing on team site. sharepointcontextfilterattribute redirects error view, when redirectionstatus.cannotredirect returned.
commenting out code moves problem index view, spcontext returned by sharepointcontextprovider.current.getsharepointcontext(httpcontext) null.

hi,,

i did same did , getting error. 

so have made changes in token helper , on default page, working.

i have uploaded sample project on github. 

https://github.com/nikhilahujasharepoint/demoappspapp/tree/master

download app , test it. major changes in home.aspx getting token. 

also have tested on windows work same on azure.

hope resolve issue. 


please remember click mark answer on answer if helps you



SharePoint  ,  Apps for Office and SharePoint  >  Developing Apps for SharePoint 2013



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'