views:

816

answers:

3

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  A: 

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

A: 

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

Sergiu
A: 

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

Kusek