Thursday, February 21, 2008

Creating Tabbed Views in InfoPath 2007

This comes from: InfoPath Team Blog

InfoPath doesn't have a built-in Tab Control, but it's easy enough to build one using tables, buttons, and views, so let's do it!
The basic idea
Here's what to build:
  • Views for the contents of each tab
  • Table with shading to give the visual effect of tabs
  • Buttons for each tab with a rule that switches the view
For example:
Then when the user clicks "Details" they switch views to see this:
How To, with tricks along the way
  1. Create all of your views (from the Views task pane)
    • Select the same color scheme for each view (use the Color Schemes task pane)
    • Use Background Color on the Format menu to make the background of each view the second color for the current color scheme (the second-darkest color at the top of the color picker)
  2. Insert a layout table (on the Insert menu, click Table)
    • Make it two rows high. The first row will be for the buttons, the second will be for the tab content.
    • Split the first row to make a cell for each view, plus one extra cell to take the remaining horizontal space.
  3. Insert a button into each cell (from the Controls task pane)
    • Add a rule to each button to switch to the corresponding view. Do this even for the current view's button.
    • Make the current "active" button Bold, so it stands out.
  4. Use borders and shading (on the Format menu)
    • Select all the buttons at once (hold down the Control key and click each one), then remove all borders and shading from the buttons (they're invisible except for their label!).
    • Select the entire table, then add borders inside and out using the first color in the color scheme (the darkest color).
    • Select the non-active cells and set their shading to the third lightest color of the color scheme.
    • Select the active cell and the content cell, and set their shading to white.
    • Select the active cell and remove the bottom border so it becomes connected to the content cell.
    • Select the right-most "extra" cell and remove the top and right border
  5. Copy the table to each view
    • Update the borders and shading to change the "active" cell for each view
    • Put all your fields for each tab in its content cell
Getting fancy
If the tabs above aren't pretty enough for your form, add some images inside a few more table cells around each button to provide rounded corners and other visual effects. It's more work, and requires some image editing, but with a little elbow grease you could get something as schmancy as this:

Tuesday, February 19, 2008

2007 Office System Tool: Outlook HTML and CSS Validator

To download the MS plugin to validate HTML & CSS for Office Outlook 2007 emails go here: http://www.microsoft.com/downloads/details.aspx?FamilyId=0B764C08-0F86-431E-8BD5-EF0E9CE26A3A&displaylang=en#filelist

Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 1 of 2)
Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 (Part 2 of 2)

Installing on Macromedia Dreamweaver 8:

When installing this for Macromedia Dreamweaver 8 you must change the path to which it installs from Dreamweaver MX 2004 to Dreamweaver 8 -

Change the path:

C:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\BrowserProfiles

To the path:

C:\Program Files\Macromedia\Dreamweaver 8\Configuration\BrowserProfiles




If you dont change the path you won't see the Microsoft Word check box available in the Target Browsers dialogue box in Dreamweaver 8:



This is not mentioned in the official documentation / installation instructions provided by MS.

Thursday, February 14, 2008

Enable Anonymous Access

This info originally came from: http://weblogs.asp.net/bsimser/archive/2006/09/25/Enabling-anonymous-access-in-SharePoint-2007.aspx

First, enable anonymous on the IIS web site:

  • Launch IIS - Start / Administration Tools / IIS
  • Select the web site, right click and select Properties
  • Click on the Directory Security tab
  • Click on Edit in the Authentication and access control section

Or, using the Central Administration section:

  • Central Administration / Application Management
  • Select “Authentication Providers” in the “Application Security” section
  • Click on the “Default” zone (or whatever zone you want to enable anonymous access for)
  • Under “Anonymous Access” click the check box to enable it and click “Save”


NOTE: Make sure the “Web Application” in the menu at the top right is your portal/site and not the admin site.

You can confirm that anonymous access is enabled by going back into the IIS console and checking the Directory Security properties.

Next, enable anonymous access in the web site.

  • In your web site navigate to the site settings page. MOSS: Site Actions / Site Settings / Modify All Site Settings. WSS: Site Actions / Site Settings.
  • Under the “Users and Permissions” section click on “Advanced permissions”



  • On the “Settings” drop down menu (on the toolbar) select “Anonymous Access”
  • Select the option you want anonymous users to have (full access or documents and lists only)


Now users without logging in will get whatever option you allowed them.

A couple of notes about anonymous access:

  • You will need to set up the 2nd part for all sites unless you have permission inheritance turned on
  • If you don’t see the “Anonymous Access” menu option in the “Settings” menu, it might not be turned on in Central Admin/IIS. You can manually navigate to “_layouts/setanon.aspx” if you want, but the options will be grayed out if it hasn’t been enabled in IIS
  • You must do both setups to enable anonymous access for users, one in IIS and the other in each site

Wednesday, February 13, 2008

SharePoint Search Service cannot find hosts file

I have been trying out various scenarios on a dev farm consisting of 2 SharePoint servers and a SQL box to see what happens...

If you start mucking around with search services and stop or change your search index server you may come accross the following error:

Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance Reason: Could not find file 'C:\WINDOWS\system32\drivers\etc\HOSTS'.

This is because the Sharepoint Timer job deletes the hosts file after you modify the web front end the crawler is pointed to. I created a new hosts file in 'C:\WINDOWS\system32\drivers\etc\' and then came across the next error:

Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance Reason: Access to the path 'C:\WINDOWS\system32\drivers\etc\HOSTS' is denied.

To solve this update the permissions on the 'C:\WINDOWS\system32\drivers\etc' directory for the WSS_Admin_WPG account allowing the following advanced permissions:
  • Traverse Folder / Execute File
  • List Folder / Read Data
  • Read Attributes
  • Read Extended Attributes
  • Create Files / Write Data
  • Read Permissions
  • Delete Permissions
The delete permission also needs to be given because the timer job actually deletes and recreates the hosts file.

An indexer is not assigned to the Shared Services Provider.

The problem:

Error when trying to view profile information in your Shared Service Provider:

An error has occurred while accessing the SQL Server database or the Office SharePoint Server Search service. If this is the first time you have seen this message, try again later. If this problem persists, contact your administrator.

Error when trying to view the search settings in your Shared Service Provider:

An indexer is not assigned to the Shared Services Provider.

This will occur if you stop your search service - in which case you will also need restart the service!

Solution:

  1. Open Central Administration
  2. Go to Shared Services Administration
  3. Click the SSP and select edit properties from its drop down list



  4. Enter the SSP process account password
  5. Assign the index server



  6. Select Ok

Move Central Administration to another server in your farm

  1. On the existing farm Central Administration server (DEV01W2K3) remove the Central Administration website:
    1. Run the SP configuration wizard
    2. Select: Do not disconnect from the server farm (Warning: Disconnecting from the server farm will result in all your web applications being deleted from IIS. They can be recreated if you reconfigure central administration again and link to the existing configuration DB, but they will be unavailable until that time. That means no web sites available and more down time than necessary!)
    3. Select: Yes, I want to remove the website from this machine
    4. Select: Ok

    Note: The configuration wizard will stop IIS and all websites may become unavailable for a few minutes while it steps through the processes. Ensure that you do not delete any databases as you will be hooking the new Central Admin site to the original DB.

    If you check IIS you will see that the Central Administration web application has disappeared leaving only your portal web apps and the OfficeServerApplication



  2. Run the SP configuration wizard on the new server (DEV02W2K3) and recreate the Central Administration site.
    1. Select: Do not disconnect from the configuration database
    2. Select: Advanced Settings
    3. Select: Use this machine to host the web site
    4. Select: Next / Ok
  3. Open central administration and check the servers in the farm – you should see Central Administration now hosted on DEV02W2K3:



  4. Check all your services are running – search may need restarting and you may need to reset the index role in the Shared Service Provider properties.
  5. Check your event logs and work through any issues.

Add a new server to a MOSS SP1 farm

  1. Backup SharePoint.
  2. Build the new SharePoint server (DEV02W2K3) and install:
    1. Windows Server 2003 Enterprise Edition
    2. NET 2.0
    3. NET 3.0
    4. MOSS 2007 – do not run the SP configuration wizard
  3. Install MOSS SP1 on the new server (DEV02W2K3):
    1. Run the WSS upgrade WSS SP1 downloads
    2. If prompted close the configuration wizard.
    3. Run the Office upgrade MOSS SP1 downloads
    4. Run the configuration wizard:
      1. Select: Connect to an existing server farm
      2. Retrieve and select the existing configuration database (MOSS_Config_DEV01W2K3) from the SQL box
      3. Select: Do not host Central Administration on this server
      4. Select: Next / Ok
  1. Go to Central Administration and check the farm topology. You should now see both SP1 servers (DEV01W2K3 & DEV02W2K3) in the farm. Note that they both show the SP1 version number 12.0.0.6219.


Saturday, February 09, 2008

Error when you try to edit the content source schedule in Microsoft Office SharePoint Server 2007: "Access is denied"

Article ID:926959
Last Review:October 1, 2007
Revision:2.4

SYMPTOMS

When you try to create a new schedule or change an existing schedule for the content source in Microsoft Office SharePoint Server 2007, you receive the following error message:
Access is denied

CAUSE

This issue occurs when the WSS_WPG group account does not have the correct permissions to the %windir%\Tasks folder on the computer that is running the Office SharePoint Server 2007 indexing service.

WORKAROUND

To work around this issue, you must add the WSS_WPG group to the Tasks folder. To do this, follow these steps:
1.Use an account that has administrative permissions to log on to the computer that is running the Office SharePoint Server 2007 indexing service.
2.Click Start, click Run, type cmd, and then click OK.
3.At the command prompt, type the following command, and then press ENTER:

attrib –s %windir%\tasks

Note In this example, %windir% is the path of the Windows folder. For example, the path can be C:\Windows.

Note If Windows Explorer is open when you make this change, you will not see the extra tab in Windows Explorer. If Windows Explorer is already open, close and then reopen it before you perform step 4.
4. In Windows Explorer, right-click the Tasks folder, and then click Properties.
5.In the Tasks Properties dialog box, click the Security tab, and then click Add
6.In the Select Users, Computers, or Groups dialog box, type WSS_WPG in the Enter object names to select box, and then click OK.
7.Grant the following permissions for the WSS_WPG account, and then click OK:
Read
Write
8.Click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
9.In Internet Information Services (IIS) Manager, right-click ComputerName (local computer), click All Tasks, and then click Restart IIS.
10.Click Start, click Run, type cmd, and then click OK.
11.At the command prompt, type the following command, and then press ENTER:

attrib +s %windir%\tasks

Note This resets the Tasks Property back to the default view.

Tuesday, February 05, 2008

Duplicate Site ID Error in the Application Event Log

After rebuilding our farm environment onto a new server with SP1 we started receiving these errors on the hour every hour. It relates to a database that was renamed and thus disassocoated with its web application, then reassociated with it using STSADM -addcontentdb.

Failure trying to synch web application d9ba0571-84d0-40c1-add9-3be5a5a5a443, ContentDB 4606754f-fb82-4829-bda1-878869c2a450 Exception message was A duplicate site ID 18318f24-21f6-4b45-95c3-5479fe6f99dc(http://ssp4dev/ssp/admin) was found. This might be caused by restoring a content database from one server farm into a different server farm without first removing the original database and then running stsadm -o preparetomove. If this is the cause, the stsadm -o preparetomove command can be used with the -OldContentDB command line option to resolve this issue.

The solution

stsadm -o sync -DeleteOldDatabases 0

Refer to MS for the full STSADM sync command info.

stsadm -o sync

-excludewebapps
-synctiming
-sweeptiming
-listolddatabases
-deleteolddatabases

Application Server Administration job error Hotfix

We have been getting variations on this error constantly...

************************************************************************************
An exception occurred while executing the Application Server Administration job.

Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

************************************************************************************
Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance (9c35167a-a25e-4661-8d9e-2f762609ee06).

Reason: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

************************************************************************************
The Execute method of job definition Microsoft.Office.Server.Administration.ApplicationServerAdministrationServiceJob (ID 2bcd5c2c-6f34-4a70-b53a-669b337c2b3e) threw an exception. More information is included below.

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

************************************************************************************


Hoorah, there is now a solution!

This comes from: http://www.sharepointfusion.com/2007/12/part-8-of-sharepoint-2007-setup-and.html

Update #1: 1/17/2008

Microsoft has now fixed the issue. See KB946517.
Summary: The root cause is the Internet Information Services (IIS) Active Directory Service Interfaces (ADSI) provider. The issue occurs when you have a process with more than one thread and two threads access IIS 6.0 at the same time. In MOSS 2007, this problem is likely to occur for OWSTimer.exe. When it occurs, you may expereince the following symptoms:
• In SharePoint Server 2007, tasks that are scheduled do not run.
• When you try to manage IIS 6.0 by using Server Manager, you receive a blank page, or you receive the following error message: the path specified cannot be used at this time
When this problem occurs, you must restart IIS 6.0, or you must restart the process that uses the IIS ADSI provider.
To apply the hotfix, you must have Windows Server 2003 SP1 or SP2 installed.

Update #2: 1/17/2008

Brummy21 posted a solution to the issue in Microsoft SharePoint forum:
a. Update .NET 2.0 to Service Pack 1
b. Update MOSS2007 to Service Pack 1
c. Apply hotfix as per KB923028.
Important - the problem was only fixed by applying the hotfix after the service packs - service packs alone did not cure.

Monday, February 04, 2008

Creating Custom Themes

http://www.cymru66.com/web-design/microsoft-sharepoint/create-a-custom-microsoft-sharepoint-theme/

All of the themes available for use on a SharePoint server are stored beneath a single folder named “THEMES“: C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\THEMES

To create a theme, start by creating a new folder with the images and CSS files that make up the theme. Here are the steps to create a new theme called “DEMO″:

  • First, make a working copy of the new theme.
    Choose one of the theme folders in the directory listed above, and make a copy of it in the “THEMES” directory. For example, copy the files in the ICE folder and paste them into the “DEMO″ folder.
    (Note: the folder name must be all caps)
    (Tip: choose a theme with similar colors/styles, which will save you time in the customization stage)
    You can now modify the files you copied as a starting point for your theme.
  • Second, modify the files that link your theme to the list of available themes.
    In your theme’s folder, rename the ICE.INF file to DEMO.INF. This name should match your folder name exactly and be all caps.
    Edit the DEMO.INF file to set the title of your theme as follows:

    [info]
    title=
    DEMOTheme

  • Finally, the list of available themes on the “Select a Theme” page is defined in this file:
    C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033\SPTHEMES.XML

    Edit this XML file and insert a new section for your custom theme wherever you’d like it to appear.
    (Note: I usually keep mine alphabetized, but this is NOT automatic)


    demo
    DEMOTheme
    Description
    ../images/demoimage.png
    ../images/
    demoimage.gif

    The TemplateID must match your folder name, but should be all lower case.
    The DisplayName should match the title you set in the MIST.INF file.
    The Preview image is a 300 x 180 pixel gif, and is used by the “Apply a Theme” function in the Admin tool. The .png version is only used by Frontpage as a preview image.

  • Now you can apply the new theme to your SharePoint site.
    - On the top navigation bar, click “Site Settings“.
    - In the “Customization” section, click “Apply theme to site“.
    - Select your your new theme, and click Apply.
    - Navigate to your SharePoint site and see how it looks!

STSADM Associate Content Database

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsa
dm.exe -o addcontentdb -url http://21cndev -databasename SHAREPOINT_21CN_WSS_Con
tent_Temp -databaseserver tdcssqlsp02