My Blog Has Moved

March 22nd, 2011 2 comments

Ok…so I’m still in the process of tweaks here and there, but I will no longer be posting any new content here. My new blog is: http://www.sharepointben.com/blog. I’ve finally decided to give it a little bit more official SharePoint name as well as host it on SharePoint 2010 thanks to FPWeb.net.

I’ve also set up feedburner with my new blog to make the RSS feed a little nicer. That URL is: http://feeds.feedburner.com/SPBenThereDoneThat.

All my content as well as any comments have also been moved over to the new site compliments of Metalogix so nothing will be lost in the move. I think that’s all for now, I may re-provision this site, sometime int he future, to be focused more on my personal life outside of SharePoint. We’ll see. So, head on over to the new site and check out my latest post on SharePoint 2010 and Document IDs.

Thanks!

Ben Stegink

Categories: SharePoint Tags:

Adding Filters to SharePoint 2010 Wiki Pages

February 16th, 2011 No comments

I just ran across this today for the first time and was honestly a little surprised by it.  I wanted to add a Choice Filter to my team site and couldn’t.  In SharePoint 2010, when creating a Team Site, wiki pages are used for the home page as well as any other pages you create.  If you edit the page and try to add a Choice Filter (as well as some of the other filters), nothing appears to be added to the page.  However, if you were to open the page in SharePoint Designer, you will see that the web part has in face been added to the page and is actually throwing and error.

So what is the solution?  There are actually two of them.

1.  Active the Publishing Feature for you site, create a Web Part Page, and use this page to add web parts to and utilize filters.

But..what if I don’t want to turn on publishing or I want to be able to use a wiki page?

2. Use SharePoint Designer to insert the filter web part.  That’s right, you can actually open a wiki page in SharePoint designer, insert your desired filter web part there and configure the connection and everything works fine.  Once the web part has been added, you can actually reconfigure it via the browser.  However, I would recommend against this as there is apparently some problem with filters, wiki pages and the browser.  The downside to this approach is you have to use SharePoint Designer which means if you want end users to be able to customize their own pages they either need to be allowed to use SharePoint Designer, or not able to use certain Filter Web Parts.

Hopefully this will be something that is added (or fixed as I’m not if this was intentional or not) in a later patch or update to SharePoint 2010.  If anyone else has additional information or a work around to adding these filter web parts to a wiki page, leave a comment and educate the rest of us.

First Jacksonville SharePoint Users Group Meeting!!

February 8th, 2011 No comments

That’s right, there is now a Jacksonville SharePoint Users Group (JaxSPUG).  We are still working out some of the final details of the group, but our first meeting has been scheduled.  We will be meeting on Feb. 17 from 4:30 – 6:00pm at the brand new ALoft Hotel.  Their address is 4812 Deer Lake Drive West.  There will be appetizers and refreshments provided.  To register for the event, you can visit our registration page – http://jaxspug-feb17.eventbrite.com/.

 

Various methods for staying apprised of future meetings as well as other happenings within JaxSPUG are:

Website – http://www.jaxspug.org

LinkedIn Group – http://www.linkedin.com/groups?gid=3754625

Facebook Page – http://www.facebook.com/pages/JaxSPUG/170254249684166

Twitter – http://www.twitter.com/jaxspug

Categories: JaxSPUG, SharePoint Tags: ,

Install and Configure SharePoint 2010 with no Database GUIDS (except PerformancePoint)

January 31st, 2011 2 comments

This is a blog post I’ve been meaning to write for a long time and have been slowly revising the content and steps.  I also can’t take credit for all the steps below, I gathered them from various resources, blogs, etc.  At the end of the post I will list all of the places I gathered these steps from.  This is also not the only way to do this, it’s just the way I have documented and how I go about configuring a SharePoint farm.

Server Installation and Prep Work

1. Decide on your SQL Server you will use

2. Configure SharePoint Accounts in AD.  The minimum you will need is 6:

  • SPAdmin (admin)
  • SPService (services)
  • SPApp (Web Application App Pools)
  • SPSearch (search service)
  • SPCrawl (crawl service)
  • SP_UPS (user profile synchronization service)

3. Make sure the SPAdmin has the following rights:

  • Local Admin on the SharePoint Servers (just for the Installation)
  • SQL Rights: dbcreator, public, securityadmin

4. Log into your SharePoint Servers and Install the SharePoint 2010 Bits

5. If the latest Cumulative Updates haven’t been install, download those and install those right after installing the bits.

6. Disable the Loopback Check (http://support.microsoft.com/kb/896861)

7. Restart the server

Configure Central Administration

1. Right-click on “SharePoint 2010 Management Shell” and “Run As Administrator” – I just created a shortcut on my desktop

2. In Powershell Run:

New-SPConfigurationDatabase –DatabaseName “SP2010_Config” –DatabaseServer “[ServerName]” –AdministrationContentDatabaseName “SP2010_Admin_Content” –Passphrase (ConvertTo-SecureString “[YourPassPhrase]” –AsPlaintext –Force) –FarmCredentials (Get-Credential)

**Notes**

  • For [ServerName] localhost will NOT work if you are running SQL on your SharePoint box (usually only likely in a dev environment)
  • Since not everyone that install/configures SharePoint is always a DB Expert, when using a SQL Named Instance:
    • A common error you may get if using a named instance will be something like: “Connot connect to database master at SQL server at [SQLServer\Instance].  The database might not exist, or the current user does not have permission to connect to it.”
    • SQL Name Instances use Dynamic Ports, before running the command above, open up SQL Configuration Managers and assign a static port to your Named Instance – http://msdn.microsoft.com/en-us/library/ms177440.aspx
    • Modify the command above slightly…for the [ServerName] use: [ServerName]\[InstanceName],[PortNumber] as an example: “SQLServer2008\SP2010,1433”
    • Create an Incoming Rule on your SQL Server to allow connections through the port you specify for your instance.Install-SP

3. Enter domain\SPAdmin and the associated password in the resulting Credential Request box.

4. Close the PowerShell Window

5. Re-Open PowerShell again as administrator

6. Run the following PowerShell Commands

  • Install-SPHelpCollection –All
  • Initialize-SPResourceSecurity
  • Install-SPService (If you install a standalone server, something I never recommend, run ‘Install-SPService –Provision’ instead.
  • Install-SPFeature –AllExistingFeatures
  • New-SPCentralAdministration –Port 9999 –WindowsAuthProvider “NTLM” (you can pick any port here you want to)
  • Install-SPApplicationContent

7. Central Administration is now configured.  You can got to the shortcut in your start menu or run “start iexplore http://[servername]:9999” from PowerShell.

Configure the User Profile Service

I’m not even going to try to type out the steps or guide you in the right direction here.  Just follow Spence Harbar’s steps EXACTLY that he posted here – http://www.harbar.net/articles/sp2010ups.aspx

You may have a few minor tweaks to the steps based on user accounts, but the process for getting the profile synchronization service is solid!!

Once your done with this, you may have an error that starts showing up in your event log about the Taxonomy Picker, to eliminate this error do the following:

  1. Navigate to \14\Template\ControlTemplates
  2. Rename TaxonomyPicker.ascx to TaxonomyPicker.ascx.broken
  3. Remember you did this incase it is actually used in an update to SharePoint 2010 in the future.

***I used the same Application Pool for all my services (the same Application Pool Account I set up when configuring the User Profile Synchronization Service).  In my case it is SharePoint Web Services Default.  So I will use this Application Pool for all Service Applications going forward.  Wherever you see this application pool name used in the future, you can replace it with your own application pool name or a new one if you want separate application pools for every service.  Also, wherever you see –Name “[somename]” or –DatabaseName –“[somename]” going forward you can replace [somename] using your own naming conventions. ***

Configure Search Services

  1. Open up SharePoint 2010 Management Shell as an Administrator again.
  2. Enter the following commands in PowerShell:
  3. $searchapp = New-SPEnterpriseSearchServiceApplication –Name “Search Service Application” –ApplicationPool “SharePoint Web Services Default” –DatabaseName “SP2010_Search_Service”
  4. $proxy = New-SPEnterpriseSearchServiceApplicationProxy –name “Search Service Application Proxy” –Uri $searchapp.uri.absoluteURI
  5. $proxy.status *It should return “Online”, if not enter $proxy.status = “online”*
  6. $changestatus.update
  7. $si = Get-SPEnterpriseSearchServiceInstance –local
  8. $si.status *If it’s disabled run Start-SPEnterpriseSearchServiceInstance –identity $si*
  9. Set-SPEnterpriseSearchAdministrationComponent –SearchApplication $searchapp –SearchServiceInstance $si
  10. $ct = $searchapp | New-SPEnterpriseSearchCrawlTopology
  11. $csid = $searchapp.CrawlStores | select id
  12. $CrawlStore = $searchapp.CrawlStores.item($csid.id)
  13. $hname = hostname **hostname is for a single server, this is the servername were you want the crawl component to reside**
  14. New-SPEnterpriseSearchCrawlComponent –CrawlTopology $ct –CrawlDatabase $CrawlStore –SearchServiceInstance $hname
  15. $ct | Set-SPEnterpriseSearchCrawlTopology –active
  16. $qt = $searchapp | New-SPEnterpriseSearchQueryTopology –partitions 1
  17. $p1 = ($qt | Get-SPEnterpriseSearchIndexPartition)
  18. New-SPEnterpriseSearchQueryComponent –IndexPartition $p1 –QueryTopology $qt –SearchServiceInstance $si
  19. $PropDB = $searchapp | Get-SPEnterpriseSearchPropertyDatabase
  20. $p1 | Set-SPEnterpriseSearchIndexPartition –PropertyDatabase $PropDB
  21. $qt | Set-SPEnterpriseSearchQueryTopology –Active

Usage Application and Usage Analysis Service

  1. Your Usage Application may have already been provisioned in one of the previous steps, if it was, go into “Manage Service Applications” and delete it.  Check the box to delete associated data as well.
  2. Once again in your SharePoint 2010 Management Shell enter the following:
  3. New-SPUsageApplication –Name “SharePoint Usage Application Service” –DatabaseName “SP2010_Usage”
  4. $App = New-SPSubscriptionSettingsServiceApplication –ApplicationPool “SharePoint Web Services Default” –Name “Subscription Service Application” –DatabaseName “SP2010_Subscription”
  5. $proxy = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $App
  6. Get-SPServiceInstance | where {$_.TypeName –eq “Windows SharePoint Services Subscription Settings Service”} | Start-SPServiceInstance
  7. $StagingDB = “<StagingDatabases><StagingDatabase ServerName=’[SQLServerName]’ DatabaseName=’SP2010_Web_Analytics_Service_Staging’/></StagingDatabases>”
  8. $ReportingDB = “<ReportingDatabases><ReportingDatabase ServerName=’[SQLServerName]’ DatabaseName=’SP2010_Web_Analytics_Service_Reporting’/></ReportingDatabases>”
  9. $webanalytics = New-SPWebAnalyticsServiceApplication –ApplicationPool “SharePoint Web Services Default” –ListOfReportingDatabases $ReportingDB –ListOfStagingDatabases $StagingDB –Name “Web Analytics Service Application”
  10.   New-SPWebAnalyticsServiceApplicationProxy –Name “Web Analytics Service Application Proxy” –ServiceApplication $webanalytics
  11. . $Usage = Get-SPServiceApplicationProxy | where {$_.TypeName
    -eq "Usage and Health Data Collection Proxy"}
  12.   $Usage.Provision()

At this point in time, navigate to “Services on Server” and start all the service you want running on their respective servers.

State Service Application

  1. While still in the SharePoint Management Console enter the following PowerShell Commands:
  • $serviceapp = New-SPStateServiceApplication –Name “State Service Application”
  • New-SPStateServiceDatabase –Name “SP2010_State_Service” –ServiceApplication $serviceapp
  • New-SPStateServiceApplicationProxy –Name “State Service Application Proxy” –ServiceApplication $serviceapp –DefaultProxyGroup

Secure Store Service

At this point in time, navigate to “Services on Server” and make sure the Secure Store Service on the Server you wish it to run on.

The secure store service is implemented in SharePoint 2010 to replace SSO.  Rather than get into all the details of it here, there are several good resources on TechNet explain the Secure Store and how to configure it.  The Secure Store Service Application can be initially configured through Central Administration allowing you to create the custom named database (without any GUIDs).  However, once this has been created, there are some additional management/configuration tasks that have to take place within the Service Application.  I use these three TechNet articles as reference when performing the rest of the configuration tasks.

PerformancePoint Service Application

Again, make sure you the the PerformancePoint Service has been started before creating the PerformancPoint Service Application.

From everything I can find, right now this can either be done via PowerShell or Central Administration, but unfortunately, no matter which way you provision PerformancePoint, there is no way to set a custom name for that database.  If I discover a way I’ll update this post with the steps.

The Rest of It

That should take care of everything that needs to be done in your SharePoint 2010 Management Shell.  The rest of the services can be configured through Central Administration.  Once you’ve reached this point, open up Central Administration.  Go to "Services on Server” and start the rest of the services you need.  This includes the Foundation Search Service that can be set up through the GUI.Next go to “Manage Service Applications” and add the rest of the Service Applications here that you need.

**As you go through setting everything up the GUI make sure to pay attention to where you can name your databases so you can continue keeping your consistent naming without the GUIDs**

Now you should have something that looks a lot like these screen shots below:

imageimage

image

Once I got to this point, I ran the PowerShell script found here – http://www.sharepointconfig.com/2011/01/instant-sharepoint-health-analysis/ in order to instantly see any issues I still had with my farm configuration.  From this report I went in and took care of a few remaining issues.  Some of the issues I encountered were things that should have been done initially and thus resulted in some updates to this blog post.

If you get an error similar to: “WebPart class [8d6034c4-a416-e535-281a-6b714894e1aa] is referenced [6] times in the database” after running the SharePoint Health Analyzer, there is a simple “fix” to get rid of this error here – http://blogs.architectingconnectedsystems.com/blogs/cjg/archive/2009/12/09/Missing-Server-Side-Dependencies-_2D00_-8d6034c4_2D00_a416_2D00_e535_2D00_281a_2D00_6b714894e1aa.aspx.

If you want to skip the link, it is a simple process of:

  1. Go to “Manage Service Applications”
  2. Select “Search Service Application” and click Manage in the Ribbon
  3. Click on “Farm Search Administration” in the Quick Launch
  4. Rerun the SharePoint Health Analyzer and this error should be gone

 

If anyone runs across any typos or problems with the steps PLEASE let me know so I can correct the issues.  Also, I can’t take credit for all of the content above, as I gathered most of the info from several different locations, they all deserve credit for their work so here are the references used for this post, these links are posted in the order I used them for the steps above:

An Update from the Desk of Ben (or Me)

January 25th, 2011 No comments

Time for another blog post, nothing “SharePointy” or incredibly mind blowing, just an update about what’s going on.  First of all an apology to anyone who has left me a comment in the last month or so and I haven’t responded.  Life has been a little hectic.  I still have all your comments marked unread in my email as a reminder to address them all.  I hope sometime this week.

One of the biggest results of me getting behind was Christmas and New Years.  My wife and I did quite a bit of traveling, both up to Michigan to see my family and out to Colorado, Wyoming and Nebraska to see my wife’s extend family.  Being gone for almost 2 weeks I got a little behind.

The second reason I’m behind is that after taking a 16 month sabbatical to pursue SharePoint work at Baptist Medical Center in Jacksonville, FL; I have returned to full time work as a Sr. SharePoint Architect for EPC Group.

While at the hospital I made a lot of good friends, many of whom I will keep in contact with and I learned a lot.  I wouldn’t trade the experience for anything.  However, I also learned I really missed the consulting and working with different clients in implementing SharePoint and using this tool to improve their business process as well as use it to help resolve various pain points within their organizations.

So, it is with great excitement and anticipation of what the future has to hold that I once again delve into the world of SharePoint consulting.

Thirdly, as a little teaser, there are also some exciting things happening in the Jacksonville area as it relates to the SharePoint community…stay tuned for more updates as they develop.

~Ben

Categories: Misc Tags:

SharePoint Timer Job – Error during encryption or decryption

January 13th, 2011 No comments

The other day I went to deploy a solution to our SharePoint farm and got the following error in the Solution Management in Central Administration.  Some important background info is that this solution first created a Web Application.

image

We have a 4 server farm and the solution wasn’t deploying to any of the servers.  Looking at the event log, we had several different errors all containing the text (the event ID for all of them was 6398):

Error during encryption or decryption. System error code 997.
Error during encryption or decryption. System error code 0.
Error during encryption or decryption. System error code 122.

All of these were based on a time job provisioning something, either the web application or the solution, or come to find out, some of our search services were having errors starting.  The web application for this solution was being created on one of our servers, but failing on the other three (this was what was actually holding up the solution from being deployed).

After doing some searching everyone gave two options:

1. Recreate your SharePoint Configuration database…yeah right, this is going to be our VERY LAST attempt.

2. Run stsadm –o updatefarmcredentials (if you want to stop reading here, run this command first and it should fix the errors listed above…ONLY if this doesn’t work consider recreating your SharePoint Configuration database)

Neither one of these really seemed to make sense, we created all 4 servers in the farm from scratch, install SharePoint on all of them at the same time, created about 8 web applications that had all provisioned fine already, and never made any changes to user credentials (as some posts suggested).  Since the web application was being created fine on Server 1, we started looking at servers 2-4 as to what happened that would block a web application from being provisioned.  We couldn’t find anything.

Finally, we looked at Server 1.  This server had a timer job running with a different credentials than Servers 2 – 4.  Come to find out, when the install had been done, for some reason SharePoint was installed on Server 1 with one set of credentials and on Servers 2 – 4 with a complete different set of credentials.  After realizing this, we conceded to the fact that yes, user credentials are probably all messed up in our SharePoint Configuration database.  We ran the stsadm –o updatefarmcredentials command this morning and all of a sudden the web application could be created, search services started and solutions were able to be deployed.

 

I’m still baffled as to how our original 8 web applications were created and how solutions were properly deployed previously, but hey, at least everything is fixed now and set up properly.

Check User Permissions on a SharePoint Site using C#

December 8th, 2010 2 comments

Another SharePoint 2007 development post from the non developer, so feel free to offer any suggestions and comments around my code as I’m still learning.  I know, I should be doing this on SharePoint 2010.  Trust me, I’m trying to get us there.

Anyways, a brief background on what I’m trying to accomplish. I’m working on a navigation solution for our current intranet that queries a list of SharePoint sites that have been requested, approved and created via our site request process.  The query results are then filter based on if the current user has access to the site.  This list contains variety of sites, site collections and sub-sites that are spread out across 3 different web applications.  The solution then displays those sites in a web part for users to have “quick access” to their collaboration sites.  It’s basically a way to provide navigation (contained in a web part) across site collections and web applications automatically off a list of sites.

In order to check for access I decided to use the DoesUserHavePermissions() function.  However, after writing this function:

private bool UserAccessToSite(String user, SPWeb testWeb, SPSite testSite){
    bool access = false;
    try{
        access = testWeb.DoesUserHavePermissions(user, SPBasePermissions.EmptyMask);
        return access;
    }
    catch{
        access = false;
        return access;
    }
}

I was getting the following error stating that the “List does not exist”

image

I tried a variety of different approaches just to get it to return false if the user has Access Denied to the site.  After a bunch of different tries and some searching online, I ran across this post by Krichie that solved the problem for me.

Right before checking DoesUserHavePermissions I had to add the line SPSite.CatchAccessDeneidExceptoin=false;

So, the final code that is now working is:

private bool UserAccessToSite(String user, SPWeb testWeb, SPSite testSite){
    bool access = false;
    try{
        testSite.CatchAccessDeniedException = false;
        access = testWeb.DoesUserHavePermissions(user, SPBasePermissions.EmptyMask);
        return access;
    }
    catch{
        access = false;
        return access;
    }
}

My web part is now configured in order to query the list and only return a link to a SharePoint site if the user currently logged into SharePoint has access to that site.  I still have some work to do on the web part and the rest of the solution, so as I continue this adventure I’ll try to post any other updates.  Who knows, maybe once I finish it I’ll even post the whole solution up here.

Again, feel free to correct my code or offer other suggestions as I continue to delve into the SharePoint development space.

SharePoint 2010 October CUs reposted

December 2nd, 2010 No comments

Just a quick update.  Yesterday Microsoft reposted the October 2010 Cumulative Updates for SharePoint 2010.  For all the information, head on over to the Microsoft SharePoint Team Blog post about the reposting.

Free SharePoint Foundation 2010 Site!

November 18th, 2010 No comments

The other day I saw a tweet about a free SharePoint Foundation 2010 site, so, being the SharePoint guy I am I decided to look into it.

Sure enough, the people over at PortalFront Hosting are giving away free SharePoint Foundation 2010 sites to SharePoint bloggers here.  The process is really simple, I registered and created a site and filled out the form to request the free site.  A couple of days later I received the email with the information about my free SharePoint Foundation 2010 site.

I’m currently considering moving my blog over to that site, but would need to do some customization work first.  If nothing else I’ll keep my blog here and link to that site to show demos and for examples.

So, if you’re looking to play around with SharePoint Foundation 2010 or just looking to host a blog on SharePoint Foundation2010 but don’t have the money to pay for a lot of the hosting options for SharePoint I highly encourage you to check them out.

Of, if you’re looking to host any other SharePoint sites, they have a variety of different SharePoint hosting plans available at different price points.

Powered by

SharePoint Hosting

Complete
SHAREPOINT HOSTING
Solutions

Categories: SharePoint Tags:

SharePoint Server 2010 October CU “recalled”

November 8th, 2010 No comments

I’m a little late in getting this out as I was out of town over the weekend, but just in case you missed it, the October Cumulative Updated for SharePoint Server 2010 has been taken down due to a recently discovered critical issues.  For more details see the posts on the Microsoft SharePoint Team Blog.

Initial Announcement – http://blogs.msdn.com/b/sharepoint/archive/2010/11/05/critical-information-about-the-sharepoint-server-2010-october-cumulative-update.aspx

Details and Workaround – http://blogs.msdn.com/b/sharepoint/archive/2010/11/06/details-and-workaround.aspx