Feeds:
Posts
Comments

Posts Tagged ‘Apps’

I’ve been working on Apps quite a lot this month and learning all sorts of things like: the difference between Office 365 D (Dedicated) and Office 365 MT (Multi-Tenant); how to setup Access Control Service (ACS); and when to use F5 in Visual Studio and when to package and deploy. It’s been a roller coaster of confusion and trial-and-error as I’ve attempted to wade through all of the How-To’s created over the last couple of years and merge them with all of the changes made available to the products during that same period. This week has brought a lot more clarity and understanding; in short, I think I’m finally starting to grasp the hang of it.

At the end of the day yesterday, I ran into an interesting phenomenon I thought would be worth sharing. Several of the documents I’ve read regarding app event receivers have said they are not supported from an on-premise install of SharePoint (see Where can I use app event receivers? in the MSDN App event receivers FAQ). Thus, online being my “only” option, I was banging my head trying to get event receivers to work in SharePoint Online for a provider-hosted app. No matter what I tried, my attached W3SVC wouldn’t stop on the breakpoint for the IRemoteEventService's ProcessEvent.

Having lost nearly all hope, I shelved my efforts and moved on to something else in the project. Upon installing the app to my on-premise SharePoint server, Visual Studio surprisingly hit my breakpoint in IRemoteEventService's ProcessEvent! Whoa! What’s going on here?

Well, it turns out that my host web (the IIS site hosting the service being called by the event) is on a Dev server. Naturally, it isn’t available publicly. As such, when SharePoint Online went to call the service, it couldn’t establish a connection. Of course, our on-premise SharePoint can connect to the Dev server because they’re on the same side of the firewall. So, what about all the documentation implying this can’t be done? Well, most of the documentation out there doesn’t consider that you can now run ACS from an on-premise server (many were written before ACS was a known option for on-premise).

Notice how the MSDN article doesn’t say it’s not possible; it only indicates that it’s not supported. I suppose such configuration as I have is just too new to support as of the last update of that article (December 31, 2014)–that more testing is needed. I for one am glad app event receivers for provider-hosted apps work when you have an accessible host web and other configurations (like ACS), either way!

Let me know if you encounter any issues using app event receivers with provider-hosted apps in an on-prem SharePoint app web and/or host web.

Advertisements

Read Full Post »