Archive for the ‘SharePoint’ Category

wssv3SP1 install: “This product requires ASP.NET v2.0″ error

Thursday, December 27th, 2007

I thought as the new year approaches I would rebuild one of our test wssv3 virtual machines

using the latest bits available thru my MSDN subscription.

ÿ
ÿ

I installed Windows 2003 Server R2, with Service Pack 2,

ran Windows Update to get the latest updates

then configured my server to be an Application server,

Click "Enable ASP.NET"

Then tried to install Windows SharePoint Services v3 with Service Pack 1 (slipstream)

ÿ
ÿ

This installer complained that I didn't have ASP.NET 2.0 installed.

A quick check of IIS Manager, web service extensions and sure enough

ASP.NET v2.0.50727 was listed not there.

ÿ
ÿ

A quick command:

C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Aspnet_regiis.exe -i

installs ASP.NET 2.0 on the machine and then Windows SharePoint Services v3 with Service Pack 1 (slipstream)
installed properly.

Custom Content Types with Custom Icons

Friday, August 24th, 2007

   

We found an interesting problem with associating a custom icon with our file format to a custom Content Type. Let me try to explain.

 Suppose we have a file format with a .tjc extension. (.tjc is just a made up file extension as an example)

If we upload a sample file, "sample.tjc", to a standard team site, the document is shown with a generic icon, which is defined by the default mapping element inside of 12HiveTemplateXMLDocicon.XML. This happens because we did not specify a file extension mapping for the .tjc file extension in the docicon.xml file

   

<DocIcons>

<Default>

<Mapping Value="icgen.gif"/>

</Default>

</DocIcons>

   

To associate the "TJC" file extension with a custom icon, we add the following line to the DOCICON.XML file, and perform an iisreset.

<Mapping Key="tjc" Value="ictjc.gif" EditText="My Custom Document Editor"
OpenControl="MyCustomEditor.OpenDocuments" />

Simple.

But what if we want to associate this icon with a custom type?

We start by creating a New Content Type:

   

Upload a .tjc file as the new document template:

   

Under the Settings ->Document Library Settings–> Advanced Settings for my document library, and toggle on the Content Types — Allow management of content types:

   

Then back on Document Library Settings page, I can add my custom Content Type, but clicking "Add from existing site content types:

   

And my custom Content type now appears in the list and should be visible on the new button.

     

  But no icon appears:

The reason is the SharePoint code is looking for a larger version of the associated docicon.xml icon, and assumes that it similar names as the similar icon, but has a prepended "lg_" in front of it. In this example, it is looking for the file "lg_ictjc.gif".

   

Thus, we create a larger version of the icon,

and prepend the filename with "lg_" ,

add it to the 12HiveTemplateimages directory,

refresh your web browser,

And the custom icon will then appear.

    

Couple of other notes:

  1. I f one use a custom Office document as your Content Type, it will just work without any modifications because both the small version and the large version of the icons already appear in the 12HiveTemplateImages directory.
  2. The size of the small icon is 16×16 pixels, 96×96 resolution and 8 bit color depth.
  3. The large icon should be 32 x32 pixels, 96×96 resolution and 8 bit color depth.
  4. If your small images are stored in a subfolder below images like this:

12HiveTemplateImagesMyCompanyictjc.gif

   You will need to create an equivalent subfolder with a prepended "lg_" rather than the image filename itself:

12HiveTemplateImageslg_MyCompanyictjc.gif

   

More about the docicon.xml  file, can be found here:

http://msdn2.microsoft.com/en-us/library/ms463701.aspx

   

Hope this helps someone.

Tom   

How to upgrade a custom wssv2 site definition to wssv3 default team site

Sunday, July 29th, 2007

In wssV2, we had created a simple custom site definition which was based on the default STS team site.

We changed the site id, the watermark on the Quick Launch and add a custom Server Control. This custom Server Control was just a modified version of the MiniNavigator Server Control described in Nigel Bridport's blog here.

   

However in wssV3, site navigation is available for free and thus, we wanted to obsolete our custom site definition in favor of reverting back to a standard team site, avoiding the maintenance of our custom site definition going forward.

   

If one looks at the upgrade definition file syntax for wssv2 to wssv3, there is no way to map from one site id in wssv2 to a different wssv3 site id.

   

To workaround this limitation:

   

  1. In wssv2, we reverted the site definition template ids from our custom number back to the standard site template id of "1", by following the steps in Jeff Holiday's

    Changing Custom Site Definition Template IDs – SharePoint 2003 blog post.

       

    But before you try this, let me reiterate Jeff's warnings first:

    "Always make sure to backup all databases and files prior to making any changes.

    NOTE: Microsoft does not support editing SharePoint SQL tables directly."

       

  2. After step 1, our site home page became corrupted. Following the "How to restore a corrupted Windows SharePoint Services" topic in the following the Microsoft knowledge base article,

    KB:832811 – Restore a corrupted Windows SharePoint Services home page,

    Our wssv2 site was now based on the STS team site definition.

       

  3. We were then able to upgrade our wssv2 sites to wssv3 sites using the standard wssv2 to wssv3 upgrade process. And we no longer have a dependency on our old wssv2 site definition.

       

    Our custom site definition wasn't heavy customized, buy your mileage my vary.

       

    Tom

       

       

FPRPC Call: How to determine if server is 2003 or 2007

Monday, July 16th, 2007

ÿ
ÿ

To programmatically determine if you are connecting to a server running wssv2 or wssv3 via a FPRPC call, use the server version RPC.ÿ

ÿ
ÿ

If the major version is 6, then it's WSS v2.ÿ

If the major version is 12, then it's WSS v3.

ÿ
ÿ

=====================

ÿ
ÿ

GET /_vti_bin/shtml.dll/_vti_rpc HTTP/1.1

X-Vermeer-Content-Type: application/x-www-form-urlencoded

Host: troys1

Accept: */*

Content-Length:21

Connection: Keep-Alive

ÿ
ÿ

method=server+version

ÿ
ÿ

HTTP/1.1 200 OK

Connection: close

Date: Thu, 25 Jan 2007 22:47:57 GM3

Server: Microsoft-IIS/6.0

X-Powered-By: ASP.NET

MicrosoftSharePointTeamServices: 12.0.0.4518

Content-type: text/html; charset=utf-8

Set-Cookie: WSS_KeepSessionAuthenticated=80; path=/

ÿ
ÿ

<html><head><title>vermeer RPC packet</title></head>

<body>

<p>method=server version

<p>server version=

<ul>

<li>major ver=12

<li>minor ver=0

<li>phase ver=0

<li>ver incr=4518

</ul>

</body>

</html>

ÿ
ÿ

ÿ
ÿ

Starting Point for OpenDocuments ActiveX Control

Thursday, May 31st, 2007

Here is some reference material available for the OpenDocuments ActiveX control

ÿ ÿ

Here is the OpenDocuments ActiveX Control documentation available on msdn, which was barely updated for wssv3, see my comments under Community Content. This documentation explains how to connect your OpenDocuments Control to SharePoint.

ÿ ÿ

For wss v2, there was the SharePad Reference Application for SharePoint Products and Technologies which Mike Fitzmaurice [MSFT] talked about it here. It is on GotDotNet which is currently being phased out, so this link may break in the near future.

ÿ ÿ

But for wss v3, this application was not been updated. Not sure why. One would think that Microsoft would want third parties to integrate these files w/ the SharePoint environment, especially moving forward with SharePoint 2007.

ÿ ÿ

–Tom

ÿ ÿ