SharePoint Personalization With Application Pages - sharepoint

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?

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

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

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

Related

developing web part for sharepoint online with visual studio without local sharepoint server

Iam trying to develop webpart for firm website on SharePoint with visual studio, the problem is that there is no solution for SharePoint online - Visual web part. When i try to create SharePoint 2013 - visual web part, I get an
error message.
The only thing there is for Sharepoint online is Apps for Sharepoint and that isn't a web part, or atleast I haven't found a way to use it as such.
When I talk to my supervisor about the error, he tells me that they can't create a virtual server for me to install the SharePoint server on and I have to code it through the Sharepoint online.
Is there any way for me to develop and deploy the webpart with an online Sharepoint server instead of local one or to atleast create it through the apps for Sharepoint?
You can use App Parts, those are Web Parts that display content from an installed App, you can add them at any page of your site as normal Web Parts, App Parts are deployed in the same package as your App, so you can have everything in the same solution.
There are plenty of resources that will help you to develop Apps and to include App Parts also, just look for the right concept in google and you will find it.
There are two kinds of SharePoint Apps (or Add-ins which is the new name), the first one is SharePoint Hosted App and the second one is SharePoint Provider Hosted App, the one you need will depend on the functionality you want to achieve, but as a general reference you can think on the data source that you want to consume in your solution, e.g. if the data to be used by the App is in the SP Site where you are going to install it, then all you need is a SharePoint Hosted App, however if the data is in an external location like databases stored in local servers, then you will need SharePoint Provider Hosted App. Of course this is just a very basic view of this topic, there are other reasons to use one or the other but its pointless to make a full list here. This is a wide topic and you can find tons of articles and guides about this.
If all you need is a simple webpart to display some content with a nice look or roll up some content and provide an output based on it, then you can use a SharePoint Hosted App, which is the easiest to develop and deploy, with this kind of app you can use JavaScript get the data from your site, and then you can display your output in an App Part.
I'm sorry to not provide specific pages to read, but that's just because it's better to look for the guides that be easier for you to understand and that may vary from person to person, all you need to know is the concepts and topics to search for.
If you want me to help you with this please send me a message (my profile).

Sharepoints 2007 Web parts Longitude search

A tool (SharePoint.Admin) has been written to catalog all the web parts used within Connect.
The tool fails when enumerating the Team Sites collection because of an error with the Longitude Web Parts on a Team Site.
Unfortunately the error is fatal and cannot be caught.
This is required to aid the SharePoint Migration project as it is vital to note all the web parts used in the 2007 environment.
We have 'n' of sites under connect intranet sites.
How do I find the sites using Longitude Web Parts in Team Sites
You can use a small script to get all instances of a particular WebPart on all sites:
Sharepoint: how can i find all the pages that host a particular web part?
There is no easier way, you need to instantiate SPLimitedWebPartManager for each page you have and look for your particular webpart on that page. You only have to extend the method to not query one SPSite but all your required sites and web applications.

Sharepoint 2007 - creation of another site collection within a intranet web application

What would be the best way/ steps to create a SHAREPOINT 2007 SITE which any one can browse through in our situation?
We already have a web application in our production which is used as a authoring site and a extended application for that site collection, were the public can access it without authentication.
Can I create another SITE COLLECTION under the current web application and then create a required web page in it?
Thanks
Jag
You can create many site collections per web application. Just go to the Central Administration console and under Sharepoint Site Management, (Under Application Management), click Create site collection. You will then be asked to select the web application under which you want to create it.
Note too that the url will appear something like webappname/sites/sitecollection
hope this helps,
sivilian

Site Template and Master pages

I am a .net developer and want to learn SharePoint. Usualy we use MasterPages to have a constant layout for all or some of the pages. My confusion here is SharePoint uses Site Template and MasterPages which both sounds to do same thing. am I right?
thanks
MasterPages and Site templates are absolutelly different thing. Master page is usually layout of some pages. It's same like in ASP.NET.
In Sharepoint you can create some sites in site collection. These sites are created according to site template. When you creating (for example) team site, it's created according to team site template, which is stored in Sharepoint folder on file system. In site templates you can specify which features should be activated when site is created, which features should be activated on site collection scope etc. Also you can specify list, which should be created, modules... And also you can specify default master page which will be used on site.
You can find more informations on msdn

Accessing all SiteCollections on a SharePoint Server with WebService

I have a bit of challenge. Knowing only the basic URL for the sharepoint installation, can I get a list of the site collections that have been created using only the basic web services that are installed?
Using the Webs web service or the SiteData web service I've been able to get information on the default site collection that's at the base URL (http://MySharePointServer/). I can also get a full list of sites below the site collection and a description of the site collection itself but I can't seem to get any info on the other site collections under the same web application.
Any help would be appreciated, I thought it would be a piece of cake to get the info.
Unfortunately, no. That functionality isn't available from the out-of-the-box web services. The only option that might work is using the Search Web Service (I'm not familiar enough with it to know).
This walkthrough describes how to add your own custom web services to the product. I strongly recommend this approach as it's very likely there will be other missing functionality you will need to add - if not now, in the near future.

Resources