Archive for the 'Technical' Category



Powershell Script to set up Sharepoint 2010 Search Crawl Schedules

 Have you ever wondered how your SharePoint site search finds all the new content that you only added 20 minutes ago? The script below sets up the incremental and full crawl schedules. While you can do this through the UI,we find  this script quicker and it can also be used with a scripted install using AutoSPInstaller.

$ssaName =”Enterprise Search Service Application”

$context=[Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($ssaName)

$incremental=New-Object Microsoft.Office.Server.Search.Administration.DailySchedule($context)

$incremental.BeginDay=”25″

$incremental.BeginMonth=”1″

$incremental.BeginYear=”2010″

$incremental.StartHour=”2″

$incremental.StartMinute=”30″

$incremental.DaysInterval=”1″

$incremental.RepeatInterval=”15″

$incremental.RepeatDuration=”1440″

$fullCrawl=New-Object Microsoft.Office.Server.Search.Administration.DailySchedule($context)

$fullCrawl.BeginDay=”25″

$fullCrawl.BeginMonth=”1″

$fullCrawl.BeginYear=”2010″

$fullCrawl.StartHour=”2″

$fullCrawl.StartMinute=”30″

$fullCrawl.DaysInterval=”1″

$contentSource=Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $ssaName -Identity “Local SharePoint Sites”

$contentSource.IncrementalCrawlSchedule=$incremental

$contentSource.FullCrawlSchedule=$fullCrawl

$contentSource.Update()

Back to PointBeyond web site

QR Code Business Cards for SharePoint MySites

The team at PointBeyond are always keen to demonstrate their technical abilities and have recently turned their attention to developing a QR code web part for SharePoint.

Once installed, user profile information is automatically displayed on SharePoint MySites in the form of a QR code digital business card. This business card can then be instantly saved to a mobile phone using the phone’s camera. An example of how this might look on your MySite is shown below. Navigating to your colleague’s profiles will display their QR Code.

To download our free web part follow this link to our website.

 

 

 

 

 

 

 

 

 

Back to PointBeyond web site

Another Successful SharePoint Upgrade

We completed another SharePoint 2007 to 2010 upgrade yesterday for a longstanding customer in minerals engineering.

It’s always great when a plan comes together and everything works pretty smoothly. In a nutshell we

  • Built a new virtual 2010 farm
  • Service packed the old farm
  • Set the old web application to read only
  • Backed up the content database
  • Restored the content database to our new SQL Server
  • Reattached the database
  • Set the new application to read/write (don’t forget that this setting comes across with the database!)
  • Switched DNS to point to the new farm

Roll on the next upgrade, starting on Monday. Dare I say it but I feel that we’re getting good at these!

Back to PointBeyond web site

SharePoint Saturday Session: Branded Extranet on SharePoint 2010 Foundation

I’m really looking forward to speaking at SharePoint Saturday about the branded Partner Portal that we built on SharePoint 2010 Foundation for Micro Focus. Good to have Milen on board as well, hope the technology behaves as we switch between Bulgaria and the UK.

So why would you want to use SharePoint 2010 Foundation to build an extranet, as opposed to its more capable big brother, SharePoint 2010 Server? The original driver for this project was the substantial cost saving, but the relative simplicity of Foundation actually also has some advantages. Of course we did lose some nice SharePoint Server functionality, but was the trade-off worthwhile? Sign up to see at http://www.sharepointsaturday.org/emea/default.aspx.

Back to PointBeyond web site

Index of SharePoint 2010 Issues and Resolutions

Thought I would consolidate the posts I have made over the last few months into a single index. The topics are quite varied as they comprise issues I have encountered while working on real world projects.

InfoPath web form not loading in SharePoint 2010

Error viewing reports in Access Services

Unable to open the file for an unknown reason in Excel Services

Document IDs and the managed metadata service

Unable to find the content type publishing link in site administration, or to use managed metadata columns

No content types have been subscribed error message

 

 

Back to PointBeyond web site

InfoPath Form not Loading in SharePoint 2010

Something weird going on here…

I’ve a URL to an InfoPath form which renders in the browser. Here is the URL

http://sp2010/_layouts/FormServer.aspx?XsnLocation=http://sp2010/TestForm/forms/template.xsn&OpenIn=browser&SaveLocation=http://sp2010/TestForm&Source=http://sp2010/TestForm

If I start IE and paste in this URL, it works fine.

If I create a desktop icon and click on it, it works fine.

But, if I paste the URL into Word 2010 or Excel 2010 and then click on it, I get the following:

The form never loads. The Javascript error is

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E)

Timestamp: Fri, 31 Dec 2010 17:08:08 UTC

Message: Syntax error

Line: 380

Char: 90

Code: 0

URI: http://sp2010/_layouts/FormServer.aspx?XsnLocation=http://sp2010/TestForm/forms/template.xsn&OpenIn=browser&SaveLocation=http://sp2010/TestForm&Source=http://sp2010/TestForm

Message: ‘g_objCurrentFormData_Error’ is undefined

Line: 549

Char: 3

Code: 0

URI: http://sp2010/_layouts/FormServer.aspx?XsnLocation=http://sp2010/TestForm/forms/template.xsn&OpenIn=browser&SaveLocation=http://sp2010/TestForm&Source=http://sp2010/TestForm

Here is line 380

var g_objHasFormPostedBack_FormControl=false;var g_objCurrentFormData_FormControl = [[],[1,[[[2,[0,["","","",-1],[[3,["",["","","",-1],[],false,false,false],-1,false,false,3]],false],-1,false,false,3]],false,[0,0],[1],false],-1,false,false,3],0,”25f04190a0d34663b6ddd45e1bf7966e_ba7c22eb533544e8b20b16a243729ec2″,”AHYXKHSEFSKL2R5RS2PME3RRTJ2RYL2UIVJVIRSPKJGS6RSPKJGVGL2UIVGVATCBKRCS4WCTJYVWE5TIPFDGC4KJOBYVU4DZNNBG2NKCKJWFQSSUIFSTMTTFIZLDEUKMGZLVQ5DQOMZE2S3TA”,1033,”2010-12-31T17:05:57″,”2010-12-31″,["0","","http:\u002f\u002fsp2010\u002fTestForm\u002fforms\u002ftemplate.xsn","http:\u002f\u002fsp2010\u002fTestForm\u002f","http:\u002f\u002fsp2010\u002fTestForm\u002fforms\u002ftemplate.xsn","http:\u002f\u002fsp2010\u002fTestForm",1,0,"FormControl",0,false],”View 1″,0,false,”TestForm – New Form”,1,”",”http:\u002f\u002fsp2010″,”ltr”,”http:\u002f\u002fsp2010″,6.34294119577127E+17,”0″,”",false,1033,”http:\u002f\u002fsp2010″,[],false,true,”",”",”0″,false,”",true,2,”",”",”",”puN2wNKuBBJ\u002fcJfi\u002fht858J7Kvg5lmIm3Ab\u002foyQb9bCuc13KdA2g5VC5SATX4mcEeMyOPR8V5fq6oC0bSAFFAQ==|634294119576971096″];

Some pretty weird looking characters after the second equals sign. If I refresh the page (F5) it works.

Line 380 now a more healthy looking

var g_objHasFormPostedBack_FormControl=false;var g_objCurrentFormData_FormControl = [[],[1,[[[2,[0,["","","",-1],[[3,["",["","","",-1],[],false,false,false],-1,false,false,3]],false],-1,false,false,3]],false,[0,0],[1],false],-1,false,false,3],0,”25f04190a0d34663b6ddd45e1bf7966e_dab1b19fd5bd43229c497a0710468307″,”AHYXKHSEFSKL2R5RS2PME3RRTJ2RYL2UIVJVIRSPKJGS6RSPKJGVGL2UIVGVATCBKRCS4WCTJYVWE5TIPFDGC4KJOBYVU4DZNNBG2NKCKJWFQSSUIFSTMTTFIZLDEUKMGZLVQ5DQOMZE2S3TA”,1033,”2010-12-31T17:17:07″,”2010-12-31″,["0","","http:\u002f\u002fsp2010\u002fTestForm\u002fforms\u002ftemplate.xsn","http:\u002f\u002fsp2010\u002fTestForm\u002f","http:\u002f\u002fsp2010\u002fTestForm\u002fforms\u002ftemplate.xsn","http:\u002f\u002fsp2010\u002fTestForm",1,0,"FormControl",0,false],”View 1″,0,false,”TestForm – New Form”,1,”",”http:\u002f\u002fsp2010″,”ltr”,”http:\u002f\u002fsp2010″,6.34294126273283E+17,”0″,”",false,1033,”http:\u002f\u002fsp2010″,[],false,true,”",”",”0″,false,”",true,2,”",”",”",”ye\u002fl3NLOSE8tEEvuHJw\u002bV8BbPew9HmxiavUkjgd\u002b\u002bkYa\u002f1J82qWX\u002bpwjlvGijygad0J6I7Vkp3onbQv56VLbwA==|634294126273282857″];

So why should clicking a link in Word 2010 or Excel 2010 be any different to following any other hyperlink? Over to Microsoft on this one I think! Anyone any ideas?

UPDATE: It seems a bit intermittent. Also setting the regional settings of the SharePoint site to “English (UK)”, the same as my client computer, seems to fix the problem.

 

Back to PointBeyond web site

Error Viewing Reports in Access Services

Here’s a common issue when trying to view a report in Access Services on SharePoint 2010.

You’ve published your database to SharePoint, and your forms work fine. However viewing a report results in the following error: This report failed to load because session state is not turned on. Contact your SharePoint farm administrator.

At first I thought this a little odd since in Central administration/Manage service applications I do have a State Service Application:

However the above application is used only internally. What Access Services actually wants is an ASP.net session state database.

A SharePoint Powershell cmdlet makes it easy to set this up. Start the SharePoint 2010 Management Shell and type

Enable-SPSessionStateService –DatabaseName YourChosenDBName

Note that is possible to specify –DefaultProvision as a parameter instead of explicitly specifying a database name, but if you use this parameter you will end up with a database name containing a GUID – yuk! With the approach shown above you instead get a nice database name:

Note also here that you can see the database we have just created as well as the State Service database used internally by SharePoint.

The article referenced below also mentions editing web.config but I have not found this to be necessary. Also as detailed in some of the comments on that article, it is important to consider the performance impact of ASP.net session state – fine for a low volume internal site, but more care needed on high volume sites. ASP.net session state is scoped to the web application so this could be a consideration when determining your web applications as part of your information architecture.

This detailed article by Mark Arend gives more information on setting up ASP.net session state.

http://blogs.msdn.com/b/markarend/archive/2010/05/27/using-session-state-in-sharepoint-2010.aspx

Back to PointBeyond web site

Excel Services – Unable to Open the File for an Unknown Reason

Error messages in the UI to Excel Services aren’t always the most helpful, take for example:

Excel Services is unable to open the file for an unknown reason.

Wait a few minutes and try to open the file again. If the problem persists, contact your administrator.

However, I am often finding that a quick check of the Windows application event log reveals the underlying problem, without the need to revert to the SharePoint log files.

In my particular case, the cause of the problem is revealed in the application log pretty clearly. The service account used to run Excel Services (more specifically the application pool identity that hosts Excel Services) does not have access to the content database containing the Excel file. The resolution is simply to grant the identity database owner rights on the content database. Excel services then works fine. It may be possible to get away with less than database owner rights – I may experiment with this in future, or would be interested to hear other experiences.

Ian

Back to PointBeyond web site

Powershell script to find unique permissions in SharePoint

Have you ever wanted to find out which of your sites, lists and items have unique permissions? This useful little powershell script will go through your SharePoint site and list them out for you.

#This script loops through all the sites in a site collection and then writes out any that have unique permissions.
[System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”) | out-null
$siteurl = “Enter URL Here”

$site=new-object Microsoft.SharePoint.SPSite($siteurl) 
 
foreach($web in $site.AllWebs)

 if ($web.HasUniqueRoleAssignments)
 {
  ”Site ” + $web.Url
 }
 foreach($list in $web.Lists)
 {
  if ($list.HasUniqueRoleAssignments)
  {
   ”List ” + $list.Title
  }
     foreach ($item in $list.Items)
   {
    if ($item.HasUniqueRoleAssignments)
    {
     ”Item ” + $item.Name + “  ” + $item.Title
    }
   }
 } 
 $web.Dispose()
}
$site.Dispose()

 Hope this helps.

Christopher Edgington

Back to PointBeyond.com

SharePoint Saturday: Access Services Slides

Well what a great day the first UK SharePoint Saturday was on 2nd October! Great sessions and enthusiasm from everyone attending, and credit to the organisers! This is the kind of event that makes you really appreciate being part of the SharePoint community!

I was very pleased to be presenting Access Services: Better than Marmite? The session looked at the traditional problems of using Access in an enterprise environment, and how Access Services could help to address them. I also built a full Access Services based solution for tracking Freedom of Information Requests in a SharePoint site, from scratch, using Access Services.

My session slides can be downloaded from here.

http://pointbeyond.files.wordpress.com/2010/10/access-services.pptx

Hope you find them useful!

Back to PointBeyond web site.

« Previous PageNext Page »



Follow

Get every new post delivered to your Inbox.

Join 279 other followers