1

We have a on-premises IIS hosted web application that uses route information to fetch data from web service and display content to users. For instance, a news URL will look like:

http://www.contoso.com/news/102034/something-happened-somewhere-news

-which is basically http://www.contoso.com/ {news controller} / {article-id}

All code in existing application is already just HTML/JavaScript, except for Routing.

Now that we have SharePoint 2013 online, and contoso.com will ultimately become a SharePoint site collection, I'm trying to find a way to keep the URLs same.

I realize that there is no way to add routes to the SharePoint 2013 online site collection. Additionally, Apps for SharePoint created via Visual Studio do not allow any server side code and only HTML + JavaScript if deployed using the SharePoint-hosted model.

So are we left with on-premises hosted SharePoint app - which allows arbitrary programming technology - BUT which requires an on-premises SharePoint installation - which basically means two SharePoint environments?

Or is there are simpler way of doing this?

EDIT: There is no authentication required in the articles application.

4
  • Any reason you can't use a provider hosted app in Azure? You would be able to do essentially the exact same thing you're doing now since you would have an entire ASP.NET application to work with (including custom code on the server) -- Also are you redirecting people to articles on a different server (no control of the actual location for you) or are the articles actually on your server and will be hosted in SharePoint?
    – John-M
    Jan 31 '15 at 22:39
  • Provider hosted app in Azure - will this eliminate the requirement of having a hosted SharePoint in addition to cloud SharePoint? Articles are on same server as the app.
    – joym8
    Feb 1 '15 at 0:59
  • 1
    Right, you could eliminate the on-premises Sharepoint hosted internally or on VMs or wherever you have it. You would be responsible for running the ASP.NET provider hosted app, but that is relatively light weight compared to managing a SharePoint instance. O365+Azure ASP.NET provider hosted App would, in general, be significantly easier to manage than a single on-premises SharePoint installation.
    – John-M
    Feb 1 '15 at 1:58
  • Most useful link I've found so far: SharePoint public website feature being replaced by GoDaddy and Wix: support2.microsoft.com/kb/3027254
    – joym8
    Feb 2 '15 at 18:05
1

Your scenario describes a Provider Hosted App.

You can use the same application you already have, integrated with O365 through an App. The main enhancement you'll have to think about in this approach has to do with authentication and incorporating the different set of tokens and contexts coming from O365.

The following article describes the App options: https://msdn.microsoft.com/en-us/library/office/fp179887%28v=office.15%29.aspx

Another alternative, less elegant, would be to use Managed Navigation's friendly URLs to pages. https://technet.microsoft.com/en-us/library/dn194311%28v=office.15%29.aspx

6
  • So I essentially need to maintain two SharePoint instances just to enable routing. That's what it boils down to right?
    – joym8
    Feb 1 '15 at 0:58
  • Nope, not at all. The Provider Hosted App is NOT a SharePoint instance. It's an application (based really on any technology, preferred/simplest choice being ASP.NET MVC) hosted in a server that is trusted by O365/SharePoint through a context token. So, you will have a single SharePoint instance, and then a provider hosted app added to that instance. When you "click" on that App you'll be redirected to the hosted application (MVC possibly) that will have all the routing logic. That "App", in turn, may consume data from SharePoint through CSOM or REST API. Does that help? Feb 2 '15 at 1:51
  • I see what you're saying now. Yes I tried that in VS before posting this. The issue was making the two websites look the same. Say for e.g. the user goes to the website powered by SP 2013 online, browses normally and then decides to read an article and clicks an article link. The provider hosted news site will have its own appearance, unless we take the pain to make sure SP 2013 and the article app remain same after every css or JS edit. Not to mention they have their own URLs.The closest they can be is contoso.com and news.contoso.com instead of contoso.com and contoso.com/news
    – joym8
    Feb 2 '15 at 2:30
  • Have you considered Themes to close the gap on UI? They won't be the same but with proper training users might understand they're in different locations. The other alternative would be exploring the Managed Navigation approach, but seems like it certainly would require a rather high development and configuration effort. Feb 2 '15 at 12:11
  • Most useful link I've found so far: SharePoint public website feature being replaced by GoDaddy and Wix: support2.microsoft.com/kb/3027254
    – joym8
    Feb 2 '15 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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