in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

tchmiel's blog

Tom's SharePoint Findings
  • wssv3SP1 install: "This product requires ASP.NET v2.0" error

    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:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Aspnet_regiis.exe -i

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

    Posted Dec 27 2007, 09:43 PM by tchmiel with 6 comment(s)
    Filed under:
  • Bizarre CHM file bug

    Background

    For the last several months, I have not been able to open .chm files that I copied down to my local box. Not sure exactly when it started happening, but my guess is after a windows update in the last couple of months. I am familiar of the changes to the .chm file behavior in XP SP2, (security update 896358 or Windows Server 2003 Service Pack 1) as described in KB 90225. Didn't see to be related to this.

       

    When I would click on the file and tried to open it, I would get the HTML Help window up and a File Download - Security Warning dialog asking me to Open, Save, or Cancel.

    If I click Open, 

    I get a File Download dialog, then it goesback to the HTML Help and File

    Download -Security Warning dialogs. An infinite loop.

    If I Click Save,

    I get the standard Save As dialog, and I save to another

    location and try to open it there, I get the infinite loop above again.

       

    No one else was seeing it in the office, then I narrowed the problem down as it looked as if it followed me around with my AD account. If I logged on to any other machine, I could not open at .chm files. All other users w/ accounts on the machine could as long as they were not in any of my directories. Happens on XP and Vista Operating Systems.

       

    Finally, it dawned on me. My domain account is Domain\Tom.Chmielenski, notice the .chm characters. Tried my wife's account. Wha La! She has the same Problem. With the help of my colleague, Jason, we were are able to narrow the problem down to a simple problem. The problem has been sent to Microsoft.

       

    Summary of the problem

    .CHM files can not be opened if the filepath includes the [.chm] characters within it.

       

    Very easy to reproduce the problem

    1.     Make a directory C:\TEST_CHM,

      [Syntax is TEST {UnderScore} CHM]

    2.     Copy any .chm file to this new directory.
    3.     Launch the .chm file (it will work fine)
    4.     Rename c:\TEST_CHM to be c:\TEST.CHM

      <!-- Syntax is TEST {Period} CHM] -->

    5.     Try to open the .chm file. (it causes an infinite loop).

         

    Workaround

    Copy the .chm file to a different directory where the .chm is not in the path.

       

       

       

       

    Posted Dec 12 2007, 09:20 PM by tchmiel with 1 comment(s)
    Filed under:
  • Custom Content Types with Custom Icons

       

    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 12Hive\Template\XML\Docicon.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 12Hive\Template\images 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 12Hive\Template\Images directory.
    2. The size of the small icon is 16x16 pixels, 96x96 resolution and 8 bit color depth.
    3. The large icon should be 32 x32 pixels, 96x96 resolution and 8 bit color depth.
    4. If your small images are stored in a subfolder below images like this:

    12Hive\Template\Images\MyCompany\ictjc.gif

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

    12Hive\Template\Images\lg_MyCompany\ictjc.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

    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

       

    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

    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

       

  • Part of the Revolution

    Okay, I confess that I have been thinking about blogging now for some time, but like everyone I have my excuses. Joel Oleson has convinced me now that I should be part of the SharePoint Blogging Revolution. So I am in. Reading and searching SharePoint blogs have become an almost daily part of my everyday life, and have proven to me to be extremely useful in my team's development on top of the SharePoint platform.

       

    A little about me. My name is Tom Chmielenski (had to shorten the blog name, if I wanted any visitors) and I currently work for Bentley Systems, Inc (we develop software for the world's infrastructure.). I am the senior technical lead on a product called ProjectWise StartPoint (this product integrates CAD files (.dgn and .dwg file formats) with the SharePoint platform.). Thus, our integration relies heavy on the OpenDocuments ActiveX Control to accomplish this integration.

       

    But to date, I haven't heard people talk much about the use of this control with SharePoint 2007 nor have I heard from other third party vendors who want to integrate their file formats to play nicely in the SharePoint environment. Therefore, the goal for me here in this blog is to share what my team has learned (mostly the hard way) in this area. Maybe some day you can help my team out along the way as well.

       

    Before I go farther, let me state the normal disclaimer applies to all postings on my blog:

       

    The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. In addition, nor do my opinions do not reflect those of my blog host, SharePoint Experts.

       

    --Tom


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts