SharePoint Personalization With Application Pages

末鹿安然 提交于 2019-12-06 14:32:42

问题


I am trying to implement personalization (WebPartManager and WebParts) on ASP.NET application deployed to SharePoint as application pages (Separate application and aspx pages deployed to _layouts).

I'd like to take advantage of SharePoint personalization provider, so I can just wire up the provider to WebPartManager in the ASP.NET application. However SharePoint seems to call SPRequest object to perform these tasks, and does not have a provider for personalization.

The second option I tried was to use SharePoint WebPartManager on these pages but it does not seem to work because application pages are not uploaded pages inside the SharePoint content database, so I receive errors when I try to add/personalize a webpart.

Does anyone know a clean way to utilize SharePoint personalization on application pages?


回答1:


Normally, application pages are not tied to a specific site. And the webpart manager keeps the personalization values with the page in the site the page comes from.

You can probably accomplish what you are trying to do by using ASP.NET personalization. But then you have to use the ASp.NET personalization infrastructure which [I think] wants to use SQL Server by default.

Of course, the drawback to this is that you will have 2 personalization infrastructures implmented. This could mean deployment headaches.

Roger Williams Franklin Laboratory




回答2:


You may want to use page layouts with publishing pages instead of application pages.




回答3:


Application Pages are ment to be shared across the Application in the Farm and doesnt support personalization. You need to deploy them as the Publishing pages to make use of the Personilization. You can try upload these files using features and as the Ghostable. So that you dont need to place them in the Pages Library you can have it in any web folder you want . For more information refer this link



来源:https://stackoverflow.com/questions/474182/sharepoint-personalization-with-application-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!