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?

enter image description here

1 Answer 1


Troubleshooting tips:

  1. Make sure the SharePoint site url is accessible from your local machine.

  2. App registration is done for the domain and App Id and app secret is correct in web.config of PHA.

  3. Certificate is generated and installed in your local desktop. Add the certificate to personal store.
  4. Make sure IssuerIdin 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? Nov 9, 2015 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.