Name ActiveX Control and public facing sites

Once again today I stumbled on a website built on MOSS where the designer of the site haven’t thought of Name ActiveX Control. The control loads on the visitors computer to access information from the installed IM about current online status. In Internet Explorer the site must be on the trusted sites list, otherwise the famous golden bar appear. For most public sites this IM status information isn’t needed anyways. And I cannot seem to get over the fact that so many ignores this.

So this is my “save-the-world-from-name-activex” blog post =)

The reason that so many sites forgetts to remove this is that the author proably doesn’t know it loads. This component loads silently when your on the intranet, because the Internet Explorer looks at the url and and determines that it’s a trusted site, ie executing the activex without further questions. However when accessing the site via internet, and the site is not a trusted site..

Well the solution is known and have been around as long as IE almost. The solution is documented here, http://support.microsoft.com/default.aspx?scid=kb;en-us;931509. The recomended solution is number 3. If you don’t like flying around to all IE owners in the world =). What this solution do is essentaly commenting out ProcessImn() and the actual call to the dll never occurs and.. no golden bar!

Search Server Express enhancing WSS

If you are used to MOSS it will feel like beeing run over by a truck to configure a WSS search. The WSS is very limited in the searching department, by obvoius reasons, and there isn’t realy that many options. Today I got a bit of time over to setup a Search Server Express next to my development WSS-server, and I spent the day by tweaking away to prepare a seminar the comming thursday.

The Search Server Express adds to WSS by adding a Shared Services Provider (a limited one) with just ability to configure search. You are able to setup Content Sources, Crawl Rules, File Types, Metadata and Federated locations (which isn’t availiable in MOSS without the infrastructure update). You will also find options on the site collection level.

So if you want to get good search right out-of-the-box without spending the money for MOSS this is the way to go. As usual there is already detailed information on technet about this. Follow this link: http://technet.microsoft.com/en-us/library/cc297193.aspx

Old news: Sharepoint End User Training

For the sysadmins, and site owners, out there who has not yet seen the Sharepoint Training Kit this is a absolute must have to educate the hords (your users). Unfortunaly the materials are only available in English, but if your userbase understands english it’s perfect. Best of all? Its based in Sharepoint. As the title says this is old news, but I think its underestimated and not deployed enough, and I haven’t written about it yet.. =)

SharePoint End User Training http://www.microsoft.com/downloads/details.aspx?FamilyID=673dc932-626a-4e59-9dca-16d685600a51&displaylang=en

Webservices from Powershell without WDSL.exe

I use Powershell to automate Sharepoint tasks quite offen. There are however some caveats about this, mainly that you have to be on the same machine as the machine you want to use as a target for the script. To solve this you can use the webservices available in Sharepoint, and I have been using this for quite some time. The only problem is that the most common method “out there” requires wdsl.exe which is a part of the .net sdk.

Today I stumbled upon a article by Lee Holmes who have constructed a method for generating the wdsl without wdsl.exe in pure powershell. This have been published for a while but usefull anyways =) I’ve also included it my spps-toolkit.ps1. Here’s the link: http://www.leeholmes.com/blog/CallingAWebserviceFromPowerShell.aspx

Common answer about diacritics

One question I offen get when delivering training for Sharepoint is about how the Sharepoint system treats our nordic charachters, such as ÅÄÖ. This is breif explanation about the problem and solution.

Problem
There is none of the setups, discs or whatever (even the nordic ones) where diacritics senitivity is turned on by default. This means that the search engine in Sharepoint treats our extra characters as accents instead of real chachters. As a Example Å is treated as accented A and Ä is also treated as a accented A. Which means that sortorders etc is not working correctly, and that search results will not match as expected.

Solution
We must tell the system that we wish to be siacritics sensitive. This is not done by GUI (CentralAdmin) but rather out trusted little helper STSADM.

The following command will deliver just that functionality:
Stsadm -o osearchdiacriticsensitive -setstatus TRUE

Also, you must rebuild the index for this to work. Se more information about the command at technet.

ShareCheck – FileSystem to SharePoint migration headache reduction.

The problems of Sharepoint not accepting all chars in filenames (&{} etc..) sometimes brings problems when you need to migrate a large number of files from filesystem. I have not yet found any program which can be batched to make this work easy. I have found SharePrep (http://www.purgeie.com/shareprep/) but I see two problems with this software: 1) it’s not freeware, 2) its not batchable (command-line). This is why I started to make ShareCheck.

The ShareCheck will traverse a directory structure and rename files which have chars not allowed by sharepoint. The program have a built-in conversion table, but you are also able to specify a external XML-file for denfinition of the conversion rules, which in turn mean that this app can be for other purposes as well. When executed the program will output a XML output which could be piped or redirected to se the results (human readable output is also availiable).

Usage of ShareCheck.exe, commandline arguments:
-path=”g:\pathtomigrate”: Specifies the path to files to process, if ommited current directory will be used.
-config=”c:\config.xml”: Specified the alternative config (se example-config.xml for defaults used when nothing specified)
-norecurse: Do not recurse subdirectories, only process the starting directory
-legacyoutput: Do not output XML, but rather a HR-text (Human Readable Text)
-whatif: Do not actualy rename the files, but just simulate what would be done

Default configuration XML (built-in and used if none is specified):
<sharecheck> (root element)
  <filechecks> (all file checks collected here)
    <startwith match=”.” replace=”” /> (startwith is to check if a specific file starts with something and replace it)
    <startwith match=” ” replace=”” />
    <filename match=”#” replace=”_” /> (filename checks the filename for the occurance anywhere and replaces)
    <filename match=”&amp;” replace=”_” />
    <filename match=”&quot;” replace=”_” />
    <filename match=”%” replace=”_” />
    <filename match=”:” replace=”_” />
    <filename match=”*” replace=”_” />
    <filename match=”&lt;” replace=”_” />
    <filename match=”&gt;” replace=”_” />
    <filename match=”?” replace=”_” />
    <filename match=”\” replace=”_” />
    <filename match=”{” replace=”_” />
    <filename match=”}” replace=”_” />
    <filename match=”~” replace=”_” />
    <filename match=”|” replace=”_” />
    <filename match=”/” replace=”_” />
  </filechecks>
</sharecheck>

Still to-do:
* Check for long directory names as well
* Actualy implement -norecursion (it’s currently broken)

Thinking of…
* Replace -whatif with -commit to always run in testmode unless specified??
* Other suggestions??

The executable are compilled for x32 and x64, its built in C# and uses .NET 3.5. The software is somewhat beta which means that you should test it before you use it in a real enviroment. No warranties, expressed or otherwise, at all – use on your own risk! The software is free, you may distribute it as you wish but please keep my info in it. Download it here.