Forum Discussion

Peter Cheung's avatar
Peter Cheung
Brass Contributor
Oct 14, 2018

my web app with SharePoint AddIns

Hi All

   I have a SharePoint Online AddIn project, it comes with a asp mvc webapp. After I publish my addin to sharepoint, how can it know where my webapp is published to? The AddIn is using the variable "remoteAppUrl" to jump to my webapp, how come I update it when i did production publish? 

 

<CommandUIHandler Command="Invoke_RibbonCustomAction1ButtonRequest"
CommandAction="~remoteAppUrl/?{StandardTokens}&amp;SPListItemId={SelectedItemId}&amp;SPListId={SelectedListId}"/>

 

Thanks

From Peter

  • Hi Peter,

    When you register the add-in as part of the installation on .../_layouts/appregnew.aspx you have to specify the target URL. This is how SharePoint "knows" where your web app is.

    I hope this answers your question

    Joel
    • Peter Cheung's avatar
      Peter Cheung
      Brass Contributor
      Thank you Great People. What about i publish my add-in to sharepoint store, users can add my add-in themselve so i have no way to touch their appregnew.aspx. Then how can i specific the URL of my hosted-webapp?
      thanks again
      Peter

Resources