1

I'm using Visual Studio 2015 to create an Outlook Add-in project from Office/SharePoint > Web Add-ins (that's JavaScript, not COM).

Without changing anything, I build then debug. I see my add-in in the desktop app but when I click to show to task pane, it throws an error:

enter image description here

Due to work reasons, I would like to deploy with Visual Studio. Why is the out-of-the-box generated solution (which uses ~remoteAppUrl instead of localhost) not working?

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
mchien
  • 33
  • 3

1 Answers1

1

The ~remoteAppUrl is a special Visual Studio parameter that gets automatically replaced with your web projects IIS Express URL when you launch it from within Visual Studio.

If you attempted to open up your web project in a browser over HTTPS (i.e. https://localhost:{port-num}/ do you get any errors?

UPDATE:

If IIS Express isn't providing SSL correctly, you may need to manually trust the certificate. IIS Express includes a self-signed certificate that is normally trusted during installation but sometimes things go sideways. Take a look at this blog post and this Stack Overflow question for some possible fixes. I would also recommend updating to Visual Studio 2017 which includes some updated tooling for Office.js. There is a free Community Edition which includes full support for Office Add-ins.

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
  • Tried both the web project SSL URL and URL in Chrome. The SSL URL doesn't connection (site can't provide a secure connection), and the URL gave me a 403.14 error for directory browsing (which i fixed). Any more ideas? – mchien Aug 24 '17 at 21:59
  • If you can't connect over HTTPS then the add-in simply won't work. Add-ins require SSL. You'll need to ensure you have a trusted self-signed cert before the add-in will launch. See my updated answer. – Marc LaFleur Aug 27 '17 at 02:56