I have developed a high-trust provider hosted app using the MVC framework to display a series of employee-focused KPI data widgets. Everything has been highly successful until I began implemented the App Parts (formally web parts -- iFrame views of the remote web application, for the uninitiated). The problem is specifically related to the routing, as I am able to successful view the application via the default route of each controller (using MVC attribute routing).


  • Any action result specified in [Route("action=TheView")] is a success.
    • Elements.xml example:
      • Src="https://apps.domain.com/Dashboard/TheView/?{Standard Tokens}" is a success
      • Src="https://apps.domain.com/Dashboard/TheOtherView/?{Standard Tokens}" is a 404 The Resource can not be found
      • Both URLs are accessible via web browser. Even explicitly revisiting the URL found in the web traffic logs (w/ parameters) is successful outside the context of SharePoint.

I certainly hope there is just some glaring, fundamental misunderstanding about using attribute routing in this scenario that I am not considering. However, I have received no useful error messages and none of my troubleshooting efforts have been successful.

Any help would be much appreciated.

1 Answer 1


You mentioned you are using attribute routing.

Are you by any chance using [HttpGet] attribute on your ActionResult?

SharePoint addin does a POST to your web application. So just remove [HttpGet] attribute and let MVC handle it or change it to [HttpPost] if it doesn't work.

  • Thank you. I knew it was some obvious oversight caused by tired eyes. I was apparently not paying too much attention to those web traffic logs. You're a champion
    – BJenkins
    Commented Jun 16, 2017 at 2:39

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.