AWG Blogs

Tuesday, November 22, 2011

Deploy List Definition

- Start SharePoint Solution Generator 2008 (comes with Visual Studio 2008 Extensions)

- Select List Definition


- click Next; if you get an error "VSeWSS Service Error: No SharePoint Site exists at the specified URL", you can ignore and click OK


- Then enter the URL, next, select the list and finish


- Open the resultant project in Visual Studio 2008 and Build - Package solution.


- Run the generated setup.bat from command line


- You may get an error if the current server does not have the Windows SharePoint Services Web application started, if so start it, and try again.


- Ignore the errors (which you might get if this is a farm with more than one web front end) concerning feature activation as we will deploy and activate next


- Open Solution management in Central Administration and Deploy the new solution (wsp file)


- another option is from the command line using the allcontenturls flag. Note the setup.bat sets the -local flag, which only applies to single server farms. However, you can use the -local flag to deploy to only the local WFE, if global deployment isn't working, e.g. because some WFEs are down.

If you intend to use the -local flag, you will need to edit setup.bat and add the following to the LDeploy section after the deploysolution operation



echo installing feature FeatureName ...


"%SPAdminTool%" -o installfeature -name "FeatureName"


- Now you can activate the lists included with the solution individually from the command line. You can verify that the solution was deployed by checking under C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\ for the names of your lists


- To activate the list/feature on a given site, do: "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\bin\stsadm.exe" -o activatefeature -id [get the id from the setup.bat file] -url http://urlofyoursite:port





That's it! Now the list is ready to be selected during list creation.





As far as activating the list/feature on all sites, there are some powershell solutions out there, e.g. http://bable.cybermarshall.com/2009/01/17/using-powershell-to-activate-a-feature-across-all-sharepoint-2007wss-30-sites-and-subsites/


(haven't tried it yet)







Sunday, November 20, 2011

Group Email in MOSS

There are a couple of gotchas in Sharepoint 2007 you have to watch for when configuring group emails.

First, if you are trying to configure alerts to an AD security group email, make sure that the security group appears under the permissions for the list, either individually or in a group. Then you can create the alert by replacing your email with that of the security group. Although, at this time, I wouldn't know where to find this alert, if I wanted to delete it.

Secondly, there a few things to watch for when trying to send an email to a Sharepoint group. First you have to email enable the sites; do it in CA under Operations, Incoming Email Settings. Then in your group's settings, create the e-mail distribution list. After submitting you will notice below "Distribution list e-mail address:" a message "Distribution list status: Creation request pending." This means you must approve the request in CA, Operations, Approve/reject Distribution Groups. When that's done, you can email the group. However, what I had to do was verify the actual email address used as shown in Active Directory Users and Computers under the OU where Sharepoint created the distribution group. In my case, the email as shown in AD was based on the domain, i.e. mygroup@mydomain.com. Whereas in Sharepoint in the group settings, was shown mygroup@server.mydomain.com. Make sure the Windows SharePoint Services Timer service is running or else the email you send to mygroup@mydomain.com (e.g. emailing it from Outlook) may never be sent.

There is still a problem with regard to adding this group email to an email action in a Sharepoint Designer built workflow. The email does not send. The NDA email contains "You do not have permission to send to this recipient." I have tried removing connection and relay restrictions in the SMTP virtual server in Exchange System Manager. I also tried configuring Sharepoint to send via a local SMTP server that relays to Exchange. But I get the same NDA error. I have had no luck getting group email to work in the three-state workflow as well, so maybe it's related to group functionality. If I select the group from the Select Users picker in Define E-mail Message SPD workflow, I do not get an NDA, but no email is sent. If I type in the group's email address, as it appears in AD, then I get the NDA. If I use the long form email address, no email is sent, nor an NDA.

Saturday, November 5, 2011

MOSS - Fix "subsite1 is already in use" Error

I created a Site collection, selecting the default Team Site Collaboration template. I then logged into the new site and attempted to create a subsite "subsite1" for which I selected the "News Site" Publishing template. This produced the following error: "sharepoint server publishing infrastructure feature must be activated". So then I activate this feature in the Site Collection Features page. I then go back and create subsite1. This gave me the error "The Web site address "/subsite1" is already in use. Funny that apparently the site was created despite the non-activated feature (bug -- probably fixed by now).

To fix, just go to the site collection root site, then Site Settings, Site hierarchy, click Manage next to subsite1 (e.g.), then click Delete this site.

Now I can create that site called subsite1. Moss 2007.