绑定提供程序主机应用程序和特定SharePoint网站

人气:713 发布:2022-09-22 标签: appsforsharepoint

问题描述

我开发了一个SharePoint内部部署自定义导航提供程序解决方案,以显示基于ODBC数据源的左侧和顶部导航。默认情况下,导航节点将打开一个targetUrl,如/sites/departments/_layouts/15/deptView.aspx?OU=OUnumberXXX ;

如果我追加布局页面并查询到诸如之类的任意网站/ sites / xxx / _ layouts / 15 / deptView.aspx?OU = OUnumberXXX,我在页面上看到了一个带有"绑定"按钮的选项。 / sites / xxx站点到OUnumberXXX。

绑定后,相同的导航节点将打开一个targetUrl,如&spanbsp; / sites / xxx / _ layouts / 15 / deptView.aspx。这是因为在绑定期间,我坚持/ sites / xxx和OU = OUnumberXXX之间的关联。

这很简单快捷。我的问题是:如果我遵循SharePoint App框架,特别是提供商托管应用程序,是否可以进行类似的绑定?

SharePoint中的

,服务器端对象模型,是否可以查询是否已将提供者托管应用程序添加到网站上?

并假设" ~remoteAppUrl / PAges / ?Default.aspx的{StandardTokens}&安培; Property1 = _colorProp_"在appmenifest中的东西(我自己没有使用它,不使用app超过4年),是否可以配置_colorProp_应用程序添加到网站时值(按网站)?

我的意思是,目前,我使用布局页面进行绑定,如果涉及提供者托管应用程序,我可以将应用程序添加到布局页面上的AppPart(Iframe)中,然后找出如何传递 OU = OUnumberXXX应用程序的查询字符串。

我想知道是否可以直接利用App框架,摆脱布局页面层。

解决方案

如果要将SharePoint页面中的QueryString值传递到SharePoint 2013中的提供商托管应用程序,请参考以下文章:

https://开头的社会。技艺t.microsoft.com/wiki/contents/articles/37391.pass-querystring-value-from-sharepoint-page-to-provider-hosted-app-in-sharepoint-2013.aspx

最诚挚的问候,

Dennis

i developed a SharePoint on-premise Custom Navigation Provider solution to show left and top navigation based on ODBC data source. And by default, the navigation node will open a targetUrl like /sites/departments/_layouts/15/deptView.aspx?OU=OUnumberXXX ;

if i append the layouts page and querystring to an arbitory site such as /sites/xxx/_layouts/15/deptView.aspx?OU=OUnumberXXX, I get the option on page with a button to "Bind" the /sites/xxx site to OUnumberXXX.

After binding, the same navigation node will open a targetUrl like /sites/xxx/_layouts/15/deptView.aspx. This is because that during the binding, i persisted the association between /sites/xxx and OU=OUnumberXXX.

This is simple and quick. My question is: if i follow the SharePoint App framework, provider hosted app in particular, is it possible to do similar bindings?

in SharePoint, with server side object model, is it possible to query on whether a provider hosted app had been added on to the site?

And suppose the "~remoteAppUrl/PAges/Default.aspx?{StandardTokens}&Property1=_colorProp_" stuff in appmenifest works (i had not used it myself, not working with app for more then 4 years) , is it possible to configure the _colorProp_ value (by site) when the app is added to the site?

I mean, currently, i do the binding with layout page, if a provider hosted app is involved, i may add the app into a AppPart(Iframe) on the layout page, and then figure out how to pass theOU=OUnumberXXX querystring to the app.

I am wondering if it's possible to leverage the App framework directly, getting rid of the layout page layer.

解决方案

Hi,

If you want to pass QueryString value from SharePoint page to Provider Hosted App in SharePoint 2013, the following article for your reference:

https://social.technet.microsoft.com/wiki/contents/articles/37391.pass-querystring-value-from-sharepoint-page-to-provider-hosted-app-in-sharepoint-2013.aspx

Best Regards,

Dennis

699