从站点主页将用户重定向到应用程序 [英] Redirect user to App from site home page

查看:102
本文介绍了从站点主页将用户重定向到应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在网站主页上,如果用户点击按钮,我们希望用户被重定向到提供商托管应用。


假设这是网站的网址:https://abc.sharepoint.com/sites/SPCustomDevelopment/_layouts/15/start.aspx#/SitePages/DevHome.aspx


<在这个页面上我们有一个按钮,点击这个按钮,我们希望用户被重定向到应用程序


应用程序URL:  https://xyz.azurewebsites.net/ Pages / Default.aspx?SPHostUrl = https%3A%2F%2Foctatech%2Esharepoint%2Ecom%2Fsites%2FSPCustomDevelopment& SPLanguage = en-US& SPClientTag = 0& SPProductNumber = 16%2E0%2E3208%2E1217


我们在按钮点击事件处理程序上编写了代码Response.Redirect(应用程序URL),但它给了我们错误


附件是屏幕截图。


但是当我们从所有网站内容页面点击它时,可以访问相同的应用程序。


当我们从网站内容点击应用程序时,它会导航到



https://abc.sharepoint.com /sites/SPCustomDevelopment/_layouts/15/appredirect.aspx?instance_id=def340c1-d77a-4e9f-abf1-3af6f78ba98a#SPVisited=1页面,然后从那里到应用URL。


我们可以看到查询字符串"instance_id"附加到"appredirect.aspx"页面,有人可以指导我们如何将用户从站点主页重定向到应用程序或我们如何获取应用程序instance_id,以便我们可以重定向用户。


提前致谢。



解决方案

嗨穆罕默德,


我也面临同样的问题。如果您找到任何解决方案,请告诉我。


谢谢。


问候,


Sandip


Hi,

On the site home page if a user on clicks on a button we want user to get redirected to the provider hosted app.

suppose this is the URL of site: https://abc.sharepoint.com/sites/SPCustomDevelopment/_layouts/15/start.aspx#/SitePages/DevHome.aspx

on this page we have a button, on click of this button we want user to get redirected to the App

App URL: https://xyz.azurewebsites.net/Pages/Default.aspx?SPHostUrl=https%3A%2F%2Foctatech%2Esharepoint%2Ecom%2Fsites%2FSPCustomDevelopment&SPLanguage=en-US&SPClientTag=0&SPProductNumber=16%2E0%2E3208%2E1217

We have written code Response.Redirect(App URL) on the button click event handler but it gives us error

Attached is the screenshot.

But the same app is accessible when we click it from the All site content page.

When we click on the App from the site content it navigates to

https://abc.sharepoint.com/sites/SPCustomDevelopment/_layouts/15/appredirect.aspx?instance_id=def340c1-d77a-4e9f-abf1-3af6f78ba98a#SPVisited=1 page and then from there to the App URL.

We can see a query string "instance_id" appended to the "appredirect.aspx" page, can someone please guide us how we can redirect user from site home page to the App Or how we can get the app instance_id so that we can redirect the user.

Thanks in advance.


解决方案

Hi Mohammed,

I am also facing same issue. Please let me know if you find any solution.

Thank you.

Regards,

Sandip


这篇关于从站点主页将用户重定向到应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆