I've windows server 2012 in my oracle virtual box VM with sharepoint 2013 and Visual Studio 2013 installed. I've setup my SharePoint server to develop apps, I created a provider hosted app from visual studio in my VM where sharepoint is installed. The app is working fine there. I created one more app from my local windows 7 host machine and tried to deploy it, the app got deployed and I was able "Trust the app". But it is returning "The remote server returned an error: (401) Unauthorized." error when II browse the app site. I'm not much experienced in Provider hosted app development. My host machine is in a domain called RECT and the the server in my VM has BSR. How can I develop and debug the app from my local machine?
1 Answer
Troubleshooting tips:
Make sure the SharePoint site url is accessible from your local machine.
App registration is done for the domain and App Id and app secret is correct in web.config of PHA.
- Certificate is generated and installed in your local desktop. Add the certificate to personal store.
- Make sure
IssuerId
in web.config is same as the one used while create trusted security token service using powershell in SharePoint server.
-
Hi Unni, thanks for the reply.The server is accessible from my local machine. I added the certificate to personal store, the issuer id is also correct. I don't know what do you mean by "App registration is done for the domain". The app client id looks fine. I thought anonymous authentication on the web application could be the issue, So disabled it. but my visual studio keep on asking the credentials after I did that. Any guess? Commented Nov 9, 2015 at 21:09