Deploying SharePoint Features To A Multiple Server Farm
November 18, 2009
I recently deployed some features, mainly web parts, to a client’s load balanced SharePoint farm. The features were created with the Visual Studio 2008 extensions for Windows SharePoint Services. When using features created with VSeWSS they work fine on a simple, non-load balanced, single server farm.
However when I tried to run the setup file produced by VSeWSS I got an error like “the feature is not available on the farm”. The reason is related to the following sentence from the stsadm installfeature operation’s help documentation: “Farm-scoped features are also automatically activated during this [installfeature] stage. Other features might still need to be activated.”
Now, if you open the feature.xml file, created by VSeWSS and look at the Feature element, you’ll see it has the following attribute: Scope=”Site” .
This means that the feature is defined at the Site level, and that it needs to be installed and then activated on a multiple server farm configuration. The standard VSeWSS setup.bat only takes care of activating the feature: “%SPAdminTool%” -o activatefeature -id 87f20850-ad52-4785-a680-195942270020 -url %TargetSiteUrl% . Whoops, that will indeed cause some problems.
Solution
First install the feature before activating it. There is one little gotcha here. Stsadm’s installfeature operation does not provide an option to specify the feature’s GUID. It only supports filename or name, and as you can expect VSeWSS only uses features’ GUIDs. So we have to modify setup.bat to use the file name, instead of the GUID and add the installfeature command for each feature:
“%SPAdminTool%” -o installfeature -filename WebPartFeature\feature.xml
“%SPAdminTool%” -o activatefeature -name WebPartFeature -url %TargetSiteUrl%
Cool, problem solved! If you don’t know this before hand, it can take a while to figure out.
Visual Studio 2008 extensions for Windows SharePoint Services
Deploy An Assembly/.dll To The GAC On Windows Server 2008
September 22, 2009
Problem: You get an error “Access is denied: [dll name]” trying to deploy a strong named assembly/.dll to the GAC on Windows Server 2008.
Solution:
1. Run the Command Prompt as Administrator and enter the command: explorer %windir%\assembly .
2. Run the Command Prompt as Administrator and enter the command:
explorer [path to directory where the dll is located].
3. Drag and drop the dll from the source directory to the GAC.
That should be it. Your assembly is now deployed to tha Global Assembly Cache. Remember to recycle your web application’s Application Pool, so that the new .dll can be loaded.
Mac OS X Common Admin Tasks
April 12, 2008
What follows here is a list of tasks that I perform from time to time on Mac OS X. I do not do a lot of Mac OS X (Darwin) administration, but every now and then I do the odd MySQL or Apache installation and configuration. Many times when tuning these types of server applications and services, I typically encounter a few scenarios not considered in the installation guide. It is at these times that I am forced to venture on my own into the world of system administration. The problem is that I do not do it enough to remember all the typical shell commands, and workarounds, or maybe I just have a very poor memory from all the coffee that I have been drinking over the years. Either way it often results in me having to rediscover, again, how to do certain things in the Mac shell. This short list solves that by serving as a quick reference.
Maybe it will be of use to other novice system administrators.
User And Group Administration
- Add a user to a group in the bash shell on Mac OS X
To make a user part of a group in the bash shell, type:
sudo dscl . -append /groups/[groupName] GroupMembership [userName]To check whether the user was successfully added to the group, reopen a new shell and use the groups command to check which groups the user is part of.
Scripting
- Make Mac OS X script executable
Let’s say the file is called GhostBlade: The command to make it executable is chmod +x GhostBlade. if you want it to run from the finder, rename the file to GhostBlade.command .
That’s it, for now. Feel free to send me your Mac OS X admin tips and tricks, and I’ll gladly to add them to the list.






