Follow SEO recommendations in your public SharePoint deployment

Hi,

Today I received a request about SEO recommendations in your SharePoint deployment. Well you should care about it always, no matter if it is SharePoint or not (although it would be better :)) In case you came from other dimension, search is the technology behind everything.

Just to the spec, I wanted to share that information:

"I would start caring about the content (SEO is content quality), and resolve features SharePoint doesn't have. You have a good pointer at http://blog.mastykarz.nl/tag/seo/ , http://blogs.technet.com/vedant/archive/2009/06/24/search-engine-optimization-in-sharepoint.aspx or http://www.thesug.org/Blogs/sharepointseo/default.aspx 

On the other hand I would work with tools as IIS SEO Toolkit to monitor the site."

Finally it is recommended to check third partner solutions and any generic SEO recommendations

Nice to Read
Search Engine Optimization Starter Guide
http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf
How to Optimize SharePoint Server 2007 Web Content Management Sites for Search Engines
http://msdn.microsoft.com/en-us/library/cc721591.aspx

Bye!

Posted 25 November 09 05:47 by carloshm | 0 Comments   
Filed under , ,
JQuery and SharePoint 2010 Javascript Conflict

Hi,

Yesterday I faced a problem with a PoC I did some months ago. I added a ratings feature to SharePoint 2007 Lists using JQuery.

There were a conflict caused by sp.js and jquery.js using prototype methods. I just followed the recomendations to avoid it.

As I had put everything in my document ready area, I just reassigned JQuery, and use the new variable at that level:

var $j = jQuery;

$j(document).ready(function(){
 $j('div.rating').rating();
});

This should remind us to double check our client code in SharePoint 2007 migration scenarios.

Bye!

 

Finally Astoria coming to your SharePoint Theatres

Hi,

Do you remember my Astoria Blog Publishing post? well now you can check that my crystal ball is up and running!

Cool to see that any SharePoint Server 2010 acts as a Data Services Server

So moving forward that vision would look like this, after installing latest ADO.NET Data Services in your SharePoint 2010 sandbox, imagine you create a blog site /carloshm, then you will be able to get the categories at  /carloshm/_vti_bin/ListData.svc/Categories. Just simple.

Check this article, as it would be worth reading!  to start using it

Bye!

Once upon a time there was an activeX CDN :)

Hi,

Yesterday after my vacations, I was reviwing Scott posts and  I found that we have announced the Microsoft Ajax CDN. A collegue then remembered me our activex.microsoft.com url.

Don't you feel we are walking in a wonderful circle :D

Bye!

Posted 22 September 09 12:34 by carloshm | 0 Comments   
Filed under , ,
JQuery Rating in SharePoint Lists

Hi,

Last week I was asked to create a sample to include in a SharePoint list rating functionality without any server code. That means only SharePoint Designer and client script.

First was how to store those ratings. Based on experience the obvious solution was to store scores in a separate list, and aggregate afterwards totals. This avoids locks at list level and improve scalability (at the end the aggregation was done from the self user).

So to accomplish this demo, you will need:

  1. Create a list that will have the totals and the items being scored (own columns and score column).
  2. Create a list to store user ratings (item_id, score, user_id)
  3. Create a view in the first list to show the rating control and allow the actions
  4. Modified that view with SharePoint Designer to customized it:
    1. Change list to XSLT view (through right click WebPartPages:listViewWebPart in order to get a WebPartPages:DataFormWebPart)
    2. Add a new layout column with the values to read (Item Id and aggregated score) and a style to apply (class=”rating”)
    3. Add JQuery library, web service library and rating library (to be included in the header adding script reference in additional page head placeholder)
    4. Add necessary styles and images to show the functionality
    5. Add custom code. You can check Jan posts and rating samples.

ListViewWebPart to DataFormWebPartStep 4.1 

<TD Class="{$IDAEG2RE}">
<DIV ALIGN="RIGHT" class="rating" title="{@ID}_{@Puntos}"></DIV>
</TD>

Step 4.2

This will give us the ability to build the UI through JQuery and associate the code to manage list items. Final result:

image

Bye!

Posted 24 August 09 10:22 by carloshm | 0 Comments   
Filed under ,
Foxit PDF IFilter must be reinstalled after installing a software update or ... Microsoft Filter Pack

Hi,

Testing search in a development environment, I faced that after installation of MS Filter Pack you need to repair FoxIt ifilter installation. So it seems it behaves as a software update too ;)

By the way, they got a success story in Microsoft Exchange Hosted Services. Great!

Cheers!

P.S. it is documented at technet too

How to: Programmatically read the ChangeLog in PowerShell

Hi,

When I was working to get powershell scripts from MSDN samples to get/set information, I created too one for reading the changelog. It was a bit tricky to build, but I manage to port Querying for specific changes to PowerShell.

You can review the changelog API in the Microsoft SharePoint Developer Documentation Team Blog and MSDN (previous link):

We wanted to monitor which changes were been read by the crawl process and been able to filter specific changes.

## SharePoint Reference [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search.Administration") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search") [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")

function global:Get-ChangeLog($url, $minutes, $changetype)
{
 trap [Exception] {
  write-error $("ERROR: " + $_.Exception.GetType().FullName);
  write-error $("ERROR: " + $_.Exception.Message);
 
  continue;   
 }

 $s = new-Object Microsoft.SharePoint.SPSite($url);
 $startTime = [System.DateTime]::Now.Subtract([System.TimeSpan]::FromMinutes($minutes));
 
 $db_id = [Microsoft.SharePoint.Administration.SPContentDatabase].getmethod("get_Id");
 $result_id = $db_id.Invoke($s.ContentDatabase, "instance,public", $null, $null, $null);
 
 $db_CurrentChangeToken = [Microsoft.SharePoint.Administration.SPContentDatabase].getmethod("get_CurrentChangeToken");
 $result_CurrentChangeToken = $db_CurrentChangeToken.Invoke($s.ContentDatabase, "instance,public", $null, $null, $null);
 
 $startToken = New-Object Microsoft.SharePoint.SPChangeToken([Microsoft.SharePoint.SPChangeCollection+CollectionScope]::ContentDB, $result_id.ToString(), $startTime);
 
 $changeQuery = New-Object Microsoft.SharePoint.SPChangeQuery($False, $False);
 $changeQuery.User = $True;
 $changeQuery.ContentType = $True;
 $changeQuery.Add = $True;
 $changeQuery.Delete = $True;
 $changeQuery.Field = $True;
 $changeQuery.File = $True;
 $changeQuery.Folder = $True;
 $changeQuery.Group = $True;
 $changeQuery.GroupMembershipAdd = $True;
 $changeQuery.GroupMembershipDelete = $True;
 $changeQuery.Item = $True;
 $changeQuery.List = $True;
 $changeQuery.Move = $True;
 $changeQuery.Rename = $True;
 $changeQuery.Site = $True;
 $changeQuery.SystemUpdate = $True;
 $changeQuery.Update = $True;
 
 $changeQuery.ChangeTokenStart = $startToken;
 $changeQuery.ChangeTokenEnd = $result_CurrentChangeToken;
 
 $db_GetChanges = [Microsoft.SharePoint.Administration.SPContentDatabase].getmethod("GetChanges", [Microsoft.SharePoint.SPChangeQuery]);
 $result_GetChanges = $db_GetChanges.Invoke($s.ContentDatabase, "instance,public", $null, $changeQuery, $null);

 write-Output $result_GetChanges | Where-Object { $_.ChangeType -eq $changetype };

 $s.Dispose();
}

Get-ChangeLog -url http://your_site_url -minutes 120 -changetype Add

Take into account that the time will get changes based on UTC

Bye!

Phrase of the week - ODF

To the point: can you point me to where it is stated that validity to the manifest schema is a ODF conformance requirement? No, I don't think you can, because such a requirement does not exist.

Rob Weir - IBM / Chief ODF Architect

Brilliant and simple answer

... I regard the schema as an equivalent case. It is a *grammar* which formally makes unambiguous formal provisions about the disposition of XML elements and attributes declared in a certain namespace. If the schema mandates that element x MUST contain element y, and an XML manifest makes use of element x but fails to use element y as mandated, then I say that document is as surely non-conformant as the one which disregards the ZIP format provisions mentioned above.

Alex Brown - Griffin Brown Digital Publishing Ltd / Technical Director

Web Slices and SharePoint

Hola,

 Last week, I read in a DL a question about how to show something cool, provide value and without custom code. Well there are many scenarios in SharePoint that empower final users in order to do this.

I instantly thought about WebSlices. As a microformat you can "decorate" your markup and include fast and easy additional funcionality to yourself or your colleagues (or even your users! :)).

What would I use to do it? Well I would start thinking in webparts that can be customized vis XSLT, or those that can render custom HTML. A quick list:

  • RSS Viewer WebPart
  • Core Search Results WebPart (any other search webpart)
  • Content By Query WebPart
  • Content Web Editor

Which will you choose? it will depend on your requirements (performance, data scope, skills). Here I will show the minimal implementation. From here you can build a custom page that leverage updates and notifications.

One MOSS challenge ;), would be to create a service that centralized these results!

I will use the federated results webpart, but configured to render synchronously.
Why?, because as you will face with the RSS Viewer webpart, you can't notifiy the client after "document ready" and you should implement "Alternative Display Source". I tried without it, and I faced some strange behaviour (sometimes the webslices icon appeared, but the Favorites Bar is not capable of showing the preview).

So it is just as easy as following the steps described at Subscribing to Content with Web Slices and (for this example) change:

  • Fixed KeyWord Query to Office 2010 (or whatever you want)
  • Customized Display Properties (number of results and length)
  • Add in the XSL Editor the classes required (in bold):
    • MainTemplate
      • <div class="hslice ms-searchsummarymain" id="LiveResults">
      • <div class="entry-title ms-searchChannelTitle">
    • MainTemplate.body
      • <div class="entry-content {$BodyClass}">

A picture is worth a thousand words:

Web Slices SharePoint

Other scenarios?

  • People Search showing collegues.
  • ChangeLog viewer
  • TFS bugs/tasks assigned to you
  • ...

 Finally, if we add code into the requirements, I would like to test a more dynamic solution:

  • Control Adapters to include all my webparts
  • EndPoints to get updates and notifications

 Ciao!

Migration from Microsoft Access to SharePoint

Hi,

Yesterday I was asked about migration paths for Access applications. Yes, there are still a spread active group (usually at the department level).

I have worked with several alternatives, however at the end you should consider four main requirements:

  • Security (Custom, AD, Sec. trim.) 
  • UI (Access, Web [native or host in SharePoint], Custom)
  • App complexity (custom code, reports, linked data)
  • Data (volume, API)

and the requirements of your organization.

I would recommend you create some Proof of concepts and evaluate which is best for your enviornment.

With this you may come to some conclusions:

  1. Migrate Data to SQL and mantain Access UI.
    1. This will use, depending on versions, different Migration for Microsoft Access Tools
    2. After migration some review will be needed (issues).
  2. Migrate Data to SQL and develop new UI or stay with the current custom UI.
    1. You can find several Third party solution apart from our own tools [above]. I like the approach of PCA (not really the Oracle section) but you can find many more at Solution Finder
  3. Migrate Data to SharePoint and mantain Access UI.
    1. This will require migration to MS Access 2007, and then follow SharePoint Migration Wizard.
    2. This has some limitations and you need to review some changes in the data model
  4. Migrate Data to SharePoint and develop new UI or stay with the current custom UI.
    1. It will depend on the complexity of your UI+Business Logic, but it will require extra work to do this as previous.

In those scenarios, you may need other tools as Reports migration into Reporting Services or migration from previous versions of MS Access.

Finally, you should think in coexistence, and look for strategies or third party solutions to get this.

I received a question about SLAM, this may work well with some applications, mixing [1,2] and [3,4] scenarios; so you really design a SharePoint solution and sync with a database model.

Is there any third party tool that may help me to the overall process?

There is no magic tool, so besides the tools linked; you should review Partners directory.

Or pehaps just wait to some preview of Office 2010 and check if there are some specific improvement in the integration with MS Access.

 Namaste!

 

 

From app_offline.htm to Failover Farm. SharePoint High Availability Scenarios

Hi again,

Last months this has been one of our main tracks we have been working on. As useful reading in order to get previous concepts, you may start reading the Plan for redundancy guide. Here you will get the idea that there are several roles that can be redundant, and others not; and traditional ways to set up server redundancy.

Here I will point out, that although it is said that Index rol is not redundant, you can achieve multiple index servers roles in different SSPs indexing the same content with a cost:

  • Double size for the same content (Property store - DB and index catalog - File)
  • Double size in your Query Servers (Both copies of the indexes)
  • Additional capacity in your backup, IIS logs and network planning

(some details in the next guide [Single farm with two SSPs  section] and more complex scenarios)

In this scenario you could move manually your Web Applications from one SSP to another, in order to get updates from that index server (remember that you really get results from your queries servers); under a power outage, server crash or index corrupt.

How can you meet a specific level of availability?

We do have a guide on this (complemented with the whitepaper about mirroring), quite complete so I would not comment much on it. Just that content updates may be evil. In our scenario content was queued in order to update the main farm after failover.

I would take the summary as my own:

"Carefully review your availability requirements. The higher the level of availability and the more systems you protect, the more complex and costly an availability solution is likely to be.

The costs of attaining availability should be evaluated based on business needs. Not all solutions within an organization are likely to require the same level of availability. You can offer different levels of availability for different sites, different services (for example, search and business intelligence), or different farms."

Yes, but I would like something easier, is it possible?

One of the many good things of our platform, is that we boost an ecosystem of partners so you will find a lot of scenarios extended. I have not deployed myself these solutions (I did more on the backup scenario), but you may contact each of them and find the best for your needs:

and always a good reference, the old Joel blog

Ok, but I would like something really easy...

Well :) (not really HA), SharePoint is a ASP.NET application at the end (yes SharePoint IS a platform, so if you are using it from within other technology this will not work for you), so you may follow ASP.NET steps to tell your users in a friendly way that you are updating or changing the platform.

It is true that from the guides available, they indicate to stop the World Wide Web Publishing Service (W3SVC) on all Web servers; but as long as you achieve the objective (Disconnect users from the server farm) with other options, why not using the app_offline.htm?

What is the app_offline.htm option? it is a new feature included in ASP.NET 2.0 (time ago :)). This basically will let ASP.NET 2.0 to shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application, sending back all requests for dynamic pages in the application to the app_offline.htm page.

Some reading I would recommend:

  1. Walkthrough: Deploying an ASP.NET Web Application Using XCOPY
  2. App_Offline.htm and working around the "IE Friendly Errors" feature

Finally, it would be great to have a solution to be deployed in order to be able to activate a feature in your sharepoint farm and copy that file in your web applications. isn't it?

Bye!

 

Sharepoint: supportability scenarios

Today I posted some samples about Search and Powershell integration. I mention about the supportability of querying sharepoint tables. I thought about it and I wanted to clarify my point of view and what is public & published.

I have listed the main areas (I'm primarly focusing on Office12) where I have seen supportability questions. If you have any question, please call your support contact or access http://support.microsoft.com/

On the other hand, there are articles as SharePoint Database Access where it is recommended to not query database but instead use the object model.

Looking back to the scenario of my original comment if you are debugging with the SQL Profiler your SSP Database and at the same time running the powershell script or getting the crawl history, you will see something like:

  • SP:Starting Event
    • exec dbo.proc_MSS_GetCrawlHistory @ContentSourceID=NULL,@MaxRecords=NULL,@BeginTime=NULL,@EndTime=NULL,@CrawlStatus=NULL
  • SP:StmtCompleted
    • SELECT A.CrawlID,A.CrawlType,B.ContentSourceID,A.Status,A.StartTime,A.EndTime,CAST(A.SuccessCount as int) as SuccessCount,A.ErrorCount,A.WarningCount from MSSCrawlHistory as A inner join (select distinct CrawlID,ContentSourceID from MSSCrawlContent) as B on A.CrawlID = B.CrawlID WHERE A.ProjectID = 1 AND DATEDIFF([Day], A.StartTime, GETDATE()) <= 7 ORDER BY A.EndTime DESC

So you may think: "as these tables are not heavy used, a directly querying with some changes may have less locking, we should follow that", something that you may test only in you lab/dev environment.

SELECT A.CrawlID,A.CrawlType,B.ContentSourceID,A.Status,A.StartTime,A.EndTime,CAST(A.SuccessCount as int) as SuccessCount,A.ErrorCount,A.WarningCount from MSSCrawlHistory as A with(nolock) inner join (select distinct CrawlID,ContentSourceID from MSSCrawlContent with(nolock)) as B on A.CrawlID = B.CrawlID WHERE A.ProjectID = 1 AND DATEDIFF([Day], A.StartTime, GETDATE()) <= 7 ORDER BY A.EndTime DESC

Just thinking in the task, this may seems better, but think about the possibility that committed data may be a requirement.

Finally, should you TSQL your sharepoint database? I would say no, as:

  • You may affect overall response of your environment
  • Unless you have enough information through our open specification program you may conflict with you EULA acceptance.

What would be better, querying or using the object model?

  • Working with the object model gives you supportability for your code as you won't have breaking changes (backward compatibility) or you will be advised about deferred/obsolete code and have migration paths. something that using TSQL you won't have.

Namaste!

Posted 31 March 09 11:41 by carloshm | 0 Comments   
Filed under , ,
How to: Programmatically Manage the Crawl of a Content Source in PowerShell

Hi,

If you have read my previous post you may think, why did you stop there? Well, that is what I thought too :), and started with this article from MSDN.

We wanted to start managing the crawling of our content source more programmatically, as we have seen that running several at the same time affects the overall process.

So running these powershell scripts as scheduled task and monitoring the status can improve in crawling.

You may improve them reusing the context and content sources and doing some pipeline 

to be included in the overall file:

## SharePoint Reference
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search.Administration")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")

To start an incremental crawl of the content source

function global:StartIncremental-Crawl($url, $csname)
{
 trap [Exception] {
  write-error $("ERROR: " + $_.Exception.GetType().FullName);
  write-error $("ERROR: " + $_.Exception.Message);
 
  continue;   
 }

 $s = new-Object Microsoft.SharePoint.SPSite($url);
 $c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);
 $sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);

 $cs = $sc.ContentSources[$csname];

 $cs.StartIncrementalCrawl();

 $s.Dispose();
}

StartIncremental-Crawl -url http://your_site_url -csname "your content source name"

To start a full crawl of the content source

function global:StartFull-Crawl($url, $csname)
{
 trap [Exception] {
  write-error $("ERROR: " + $_.Exception.GetType().FullName);
  write-error $("ERROR: " + $_.Exception.Message);
 
  continue;   
 }

 $s = new-Object Microsoft.SharePoint.SPSite($url);
 $c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);
 $sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);

 $cs = $sc.ContentSources[$csname];

 $cs.StartFullCrawl();

 $s.Dispose();
}

StartFull-Crawl -url http://your_site_url -csname "your content source name"

To pause a crawl in process

function global:Pause-Crawl($url, $csname)
{
 trap [Exception] {
  write-error $("ERROR: " + $_.Exception.GetType().FullName);
  write-error $("ERROR: " + $_.Exception.Message);
 
  continue;   
 }

 $s = new-Object Microsoft.SharePoint.SPSite($url);
 $c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);
 $sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);

 $cs = $sc.ContentSources[$csname];

 $cs.PauseCrawl();

 $s.Dispose();
}

Pause-Crawl -url http://your_site_url -csname "your content source name"

To resume a paused crawl

function global:Resume-Crawl($url, $csname)
{
 trap [Exception] {
  write-error $("ERROR: " + $_.Exception.GetType().FullName);
  write-error $("ERROR: " + $_.Exception.Message);
 
  continue;   
 }

 $s = new-Object Microsoft.SharePoint.SPSite($url);
 $c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);
 $sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);

 $cs = $sc.ContentSources[$csname];

 $cs.ResumeCrawl();

 $s.Dispose();
}

Resume-Crawl -url http://your_site_url -csname "your content source name"

To stop a crawl of the content source

function global:Stop-Crawl($url, $csname)
{
 trap [Exception] {
  write-error $("ERROR: " + $_.Exception.GetType().FullName);
  write-error $("ERROR: " + $_.Exception.Message);
 
  continue;   
 }

 $s = new-Object Microsoft.SharePoint.SPSite($url);
 $c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);
 $sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);

 $cs = $sc.ContentSources[$csname];

 $cs.StopCrawl();

 $s.Dispose();
}

Stop-Crawl -url http://your_site_url -csname "your content source name"

To check the crawl status values for a content source

function global:Get-CrawlStatus($url)
{
 trap [Exception] {
  write-error $("ERROR: " + $_.Exception.GetType().FullName);
  write-error $("ERROR: " + $_.Exception.Message);
 
  continue;   
 }

 $s = new-Object Microsoft.SharePoint.SPSite($url);
 $c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);
 $sc = new-Object Microsoft.Office.Server.Search.Administration.Content($c);

 Write-Output $sc.ContentSources;

 $s.Dispose();
}

Get-CrawlStatus -url http://your_site_url | Format-Table -property CrawlStatus, CrawlStarted, CrawlCompleted

Enjoy!

 

How to: Programmatically Export the Crawl History to a CSV File in PowerShell

Hi,

When I came across the article at MSDN How to: Programmatically Export the Crawl History to a CSV File I thought I would never create such a tool just for that specific feature, as you end up with additional requirements in order to create an admin tool.

But today I needed to get data from crawl history, and I didn't want to get them from SQL (remember it is not supported ;)), so I started to write down a simple powershell script to do it. And then I realized that for this atomic actions, indeed it is a great options!: you give admin people multiple commands that they can use/combine to monitor/get information about the environment (and yes many, many things more)

## SharePoint Reference
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search.Administration")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.Search")
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")

function global:Get-CrawlHistory($url)
{
 trap [Exception] {
  write-error $("ERROR: " + $_.Exception.GetType().FullName);
  write-error $("ERROR: " + $_.Exception.Message);
 
  continue;   
 }

 $s = new-Object Microsoft.SharePoint.SPSite($url);
 $c = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($s);
 $h = new-Object Microsoft.Office.Server.Search.Administration.CrawlHistory($c);

 Write-OutPut $h.GetCrawlHistory();

 $s.Dispose();
}

Then you can just execute: Get-CrawlHistory -url http://your_site_url/ | Export-Csv your_path_and_file_name

Then you can import to excel and make some charts.

In order to filter the information some useful columns should be denormalized: CrawlType, ContentSourceID, Status.

Cheers!

Use jQuery to make FrontPage requests

Hi,

It is interesting to see JQuery growing in the SharePoint space. For sure client APIs will enrich the ecosystem of SharePoint applications.

Some time ago, we needed a way to get some information we were storing in the property bag of our SPWebs. As the process to store the values were automated and the tests done programmatically; we really didn't care about any tool to manually check its values.

But, the day arrived and we needed to review them in preproduction environment. So how will you do it? well there are several ways to do it:

  1. Create a console/web application and implement it through the OM.
  2. Open SharePoint Designer and read them
  3. Install third party solution to do the job

They are all good candidates, but we couldn't neither install nor run a SPD instance or custom code; so I decided to run a web page :)

Here it is when JQuery comes to the rescue:

  1. Download JQuery library from jquery.com and upload it to a (test) document library
  2. Create a webpartpage in the same document library
  3. Drop a content web editor webpart on any webpartzone
  4. Update the contents of html with something similar to the following snippet, where the path starts from the web you want information from:

<script type="text/javascript" src="jquery-1.3.1.min.js"></script>
<script>
$.ajaxSetup({
        beforeSend: function(xhr) {xhr.setRequestHeader("Accept", "auth/sicily");xhr.setRequestHeader("X-Vermeer-Content-Type", "application/x-www-form-urlencoded");}
});

$.post("/site/_vti_bin/_vti_aut/author.dll", { method: "open service"},
  function(data){
    $("#vermeer_content").append(data);
  });
</script>
<div id="vermeer_content">
</div>

you will get something like this:

JQuery Response FRPC

the sample just sends a request with a method that provides meta-information for a Web site, in this case to our client application.

method=open service:server_extension_version&service_name=/[&effective_protocol_version=version]
References:

open service Method

[MS-FPSE]: FrontPage Server Extensions Remote Protocol Specification

 

More Posts Next page »

Search

This Blog

Free Tools

Syndication

Page view tracker