Wednesday, March 21, 2007

VSTO 2005 SE Publish Wizard

Warning : If you use the VSTS 2005 SE Publish Wizard it creates a set of files that cannot be moved from the published folder.

An easier way of deploying your Excel application to a small number of clients is to compile and then copy the *.xls and *.dll file from your application bin\release folder to a location on your network or client pc.

You then need to setup a .NET 2.0 trust for the folder containing your files. I prefer to use the graphical UI tool to do this. In order to get the "Microsoft .NET Framework 2.0 Configuration" tool in Control Panel->Admin Tools you need to install the .NET 2.0 SDK. Get it here 340Mb just to get one tool...ouch! When you install this you only need the tools, don't install the samples or documentation.

Once you have installed the SDK you can open "Microsoft .NET Framework 2.0 Configuration" from Control Panel->Admin tools to setup a trust for the folder holding your files. Open "Microsoft .NET Framework 2.0 Configuration" and expand my Computer -> Runtime Security Policy -> Machine -> Code Groups -> All_Code -> My_Computer_Zone, right click on My_Computer_Zone and select "New...". Name the item and press Next, change the Membership condition to URL and enter the path to your folder in this format:-


The "file://" is required as a prefix. "\*" is required at the end so the entire folder is trusted. Then on the Permission Set tab change to FullTrust. This sets up trust to allow anything in the c:\FolderName folder to execute. You may want to setup a more restrictive permission set. You may also want to uninstall the SDK once you have setup the trust. You can also use a command line tool to setup these trusts but I could not work out how to use it as you cannot see what it has changed.

If you are installing the files on a network folder you need to use LocalIntranet_Zone rather than My_Computer_Zone.

In order to change these settings you need local admin rights on the client pc.

Before you can install a VSTO SE App you need the following :-

Office 2003 Professional
SP2 is not required but well worth installing anyway

Microsoft .NET Framework 2.0

Microsoft .NET Framework 2.0 SDK

Office 2003 Primary Interop Assemblies

VSTO 2005 SE runtime

Install in the order shown above.

Thursday, March 15, 2007

VSTO SE only works with Office 2003 Professional

I think I have finally established that VSTO SE only works with Office 2003 Professional (or any version of Office 2007) when using document level applications, Office 2003 Standard is not supported. Apparently you can install application level apps on Office 2003 Standard (although I have not tested this).

This Microsoft document which indicates that VSTO SE will install on Office 2003 Standard is therefore wrong, or at best incomplete, as in fact only application level apps are supported on Office 2003 Standard.

Wednesday, March 14, 2007

Deploying VSTO SE Excel applications

I've had real trouble attempting to deploy an Excel VSTO SE app today. I cannot believe how difficult they have made this. It's dead easy to write the application using Visual Studio 2005 but the deployment is an absolute nightmare.

I've eventually found a solution. Starting from an empty XP SP2 machine do this and it should work. I'm sure it's not the most secure configuration but at least it works.

1) Install .NET 2.0
2) Install .NET 2.0 SDK (Tools only, no need for samples or docs)
This is required so you get the .NET Framework 2.0 Configuration tool in control panel -> admin tools. Unfortunately it's no longer distributed as part of the framework as it was in V1.1.
3) Install Excel Professional 2003, use advanced customization and add under Excel ".NET Programability support" to be installed to disk
4) Install Office SP2
5) Install VSTO SE Runtime

Use the .NET Framework 2.0 Configuration tool and right click on My Computer-> Runtime Security Policy-> Machine-> All_Code-> LocalIntranet_Zone and select "New...".

On the first tab enter any name for your app.
On the second tab set the membership condition to be URL and enter the folder containing your published files followed by \* (eg file:////MyServer/my excel app\*).
On the third tab change Permission Set to Full Trust.

Once you have done this you should be able to open the Excel spreadsheet from the published location.

This assumes you have used the Publish Wizard in VS2005 to create the application folder which contains the .xls and .dll files together with the associated manifests and config files.

Friday, March 09, 2007 does not work with IE7 or FF2

Today I discovered that does not work with IE7 on Vista or FF2. It works OK in IE6. This is because the site uses 40 bit MD5 encryption which (along with 56 bit) has been discontinued in IE7 and FF2 because it is too insecure.

If you want to access the site you can use Firefox 2 and type about:config into the location bar and press enter. Find the setting security.ssl3.rsa_rc2_40_md5 and double-click on it to change its value to true.

I cannot find a solution for IE7 from the client end. Vodafone simply need to replace the totally insecure 40 bit encryption on their servers.

I cannot believe that Vodafone can run a 'secure' site that relies on obsolete 40 bit encryption.

Thursday, March 08, 2007

Sony W880i

I upgraded my phone to a Sony Ericsson W880i this week. It's a cool phone. The only thing it could do with is WiFi. Unfortunately I cannot get any 3G coverage so I cannot make any video calls.

Another problem is the lack of Vista support. The PC Sync software will only install in XP.