I have developed the Provider hosted app. Using two way.

  1. I have create Self Signed certificate and created app using that. When I run the app from Visual Studio it runs perfectly. After that I publish my app's Web Application to my local IIS. And it works from there also when I hit F5 from Visual Studio.

    But, When I add my .app file to AppCatalog of my site. And install my app to site and try to run that app, at that time it gives me error System.Net.WebException: The remote server returned an error: (401) Unauthorized

  2. I have also create app without using self signed certificate and created the ClientID and ClientSecret from my site and created app using that. And then I publish my app's Web Application to IIS and try to run that app It gives me error of The parameter 'token' cannot be a null or empty string

Is there any other way to create Client Context object for my App?
How to solve this Issues..?

1 Answer 1


There is quite a bit of setup required to deploy a provider-hosted App in a local (on-premises) SharePoint farm. Eric Shupps has a blog post that details everything you need to do to get this working.

Configuring High Trust Apps for SharePoint 2013

  • Hi Rob Windsor, the above provided link was broken. Could you please update the link..
    – TARUN
    Feb 21, 2017 at 10:22
  • The link has been updated Feb 21, 2017 at 11:23

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.