Apr
10
2006

New milestone reached in Tech Head Brothers publishing tool

As said in a past post: Yeah!!! :-) Publications are working, I am working on the new publishing tool for my website Tech Head Brothers, and today I reached another milestone: The tool is now installed on Laurent Duveau notebook and he is able to post directly from Word 2003.

Currently the tool let the author

  • choose images to insert using a Document Action Pane

  • copy source code from Visual Studio and paste it into Word 2003, generating an external source code colorized XHTML file

  • have a local disconnected preview of there content through a XSLT rendering
  • post there content on the website using Web Services

And finally here is a picture of what you can get (the design is not finished and still a bit buggy) with the tool when the content is published:

May
3
2005

Being a ReSharper Guru

If you are using ReSharper from JetBrains and you have some difficulties to remember the different available shortcuts then I recommend you this Pdf file:

ReSharper 1.5 Default Keymap

[ Currently Playing : Tank - Asian Dub Foundation - Tank (05:37) ]

Apr
26
2005

Going live in 1 hour

Today I am with Microsoft France in Strasbourg for the "Rencontres Solutions Métiers sur Office" where I will demonstrate the tool and the publishing chain of Tech Head Brothers. I will be on stage in one hour to demonstrate the smart application and to show one live publication on the web site of a new article by Mitsuru FURUTA talking about WinForms.
Apr
23
2005

Speaker at "Rencontres Solutions Métiers sur Office" with Microsoft France in Strasbourg

Tuesday, 26 April I will be with Microsoft France in Strasbourg as a speaker for the "Rencontres Solutions Métiers sur Office".  I will demonstrate the tool I developed for Tech Head Brothers website based on VSTO 2003, Word 2003, XML Schema, XML, XSLT, Web Services secured with WS-Security and WS-Policy.

You might have a look at the planning here. And register here.

Surfing the site I realized that Tech Head Brothers was listed as a Partner, nice :-).

[ Currently Playing : Pause - IAM - Revoir Un Printemps (04:20) ]

Apr
23
2005

VSTO 2003 with .NET Framework Beta 2

I finally managed to have a first beta going to the Tech Head Brothers authors of my publishing tool based on Word 2003, XML, Web Services... Read more and a bit more.

So I have a cool setup for the tool that works for me on two machines, but when you start to distribute your software you face other challenges. On three authors computer it was not working, a VSTO security problem, for sure what else. After some discussions with them I realized they had the .NET Framework Beta 2 installed. And so ?

Here is the explanation from Misha Shneerson I had on the newsgroup:

VSTO loader (aka OTKLoader) that shipped with Office 2003 RTM would always load the latest runtime installed on the machine. Once you install .NET Fx 2.0 this runtime will be loaded. Each version of CLR runtime has its own CAS policy settings. Note also that installinng .NET Fx 2.0 would not migrate security policies from .NET Fx 1.1. So, the real problem is that your code simply does not have permission to load once .NET Fx 2.0 is installed.

The brute force solution is of course to force loading v1.1 version of CLR through the config file. But this will rule out the usage of VSTO 2005 since VSTO 2005 runtime requires CLR 2.0 to run and you can not have both versions of CLR running at the same process. Unfortunately, I should add.

So, I would suggest to manually migrate Fx 1.1 security policies to Fx 2.2. I know this is painful, but this is the least bad solution for now.

I am not sure I can disclose the full details but before VS 2005 ships we will see an Office 2003 SP2 coming out. The SP will contain a patch for OTKLoader that would not require migrating security policies from 1.1 to 2.0 even though the 2.0 version of CLR will be loaded on the machine.

The brute force solution is one I already used. You have to force Word 2003 to load the .NET Framework you are interested in by creating a winword.exe.config and saving it in the folder of winword.exe. Thanks to Chuck Hartman to remind me that method:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
 <startup>
  <supportedRuntime version="v1.1.4322" />
 </startup>
</configuration>

My first trial to migrate the security policies from 1.1 to 2.2 was not sucessful, so I first sent the brute force solution to the different authors. Then I thought of a solution I saw some times ago on the blog of Peter Torr : A useful regfile for VSTO.
So I took his regfile and modified to run with .NET Framework 2.0:

Windows Registry Editor Version 5.00 

[HKEY_CLASSES_ROOT\dllfile\shell\FullTrust] 
@="Trust assembly Beta 2" 

[HKEY_CLASSES_ROOT\dllfile\shell\FullTrust\command] 
@="C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50215\\caspol.exe -q -u -ag 1 -url \"%1\" FullTrust -n \"%1\"" 

[HKEY_CLASSES_ROOT\dllfile\shell\UnTrust] 
@="Remove assembly trust Beta 2" 

[HKEY_CLASSES_ROOT\dllfile\shell\UnTrust\command] 
@="C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50215\\caspol.exe -q -u -rg \"%1\"" 
  
[HKEY_CLASSES_ROOT\exefile\shell\FullTrust] 
@="Trust assembly Beta 2" 
  
[HKEY_CLASSES_ROOT\exefile\shell\FullTrust\command] 
@="C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50215\\caspol.exe -q -u -ag 1 -url \"%1\" FullTrust -n \"%1\"" 

[HKEY_CLASSES_ROOT\exefile\shell\UnTrust] 
@="Remove assembly trust Beta 2" 

[HKEY_CLASSES_ROOT\exefile\shell\UnTrust\command] 
@="C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50215\\caspol.exe -q -u -rg \"%1\"" 

[HKEY_CLASSES_ROOT\Folder\shell\FullTrust] 
@="Trust folder Beta 2" 

[HKEY_CLASSES_ROOT\Folder\shell\FullTrust\command] 
@="C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50215\\caspol.exe -q -u -ag 1 -url \"%1\"\\* FullTrust -n \"%1\"" 

[HKEY_CLASSES_ROOT\Folder\shell\UnTrust] 
@="Remove folder trust Beta 2" 

[HKEY_CLASSES_ROOT\Folder\shell\UnTrust\command] 
@="C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50215\\caspol.exe -q -u -rg \"%1\"" 

Now it is running without the brute force solution, so it is much cleaner.

[ Currently Playing : Strategie D'un Pion - Iam - Revoir Un Printemps (04:36) ]

Mar
28
2005

Report from Redmond - By Rick Ross of Javalobby

"Rick Ross, founder of Javalobby, talks about our recent trip to the Microsoft campus in Redmond Washington for the Technology Summit 2005. This gathering of developers from a variety of platforms yielded some interesting insights from all parties. Listen on for Rick's overview and thoughts on the summit.

Listen to the report now!
Read the offline PDF "

From Rick: "I am encouraging mutual respect and a dialogue to keep the possibility for progress alive. Frozen hatred is not in the best interests of the Java developer community."

"I want it to be explicitly clear that I am NOT advocating any Java developer to abandon Java. I am only saying that we should consider, as a community, treating our peer developers in the Microsoft world and elsewhere with more respect and open-mindedness."

Nothing to add. You said everything Rick !!!

Mar
18
2005

NFOP new way of creating the Pdf

I was asked about the new way to work with NFOP to generate the pdf without the old Engine class. So here is what I am doing:

  1 #region Using
  2 
  3 using System.Net;
  4 using System.Reflection;
  5 using System.Xml;
  6 using System.Xml.Xsl;
  7 using java.io;
  8 using log4net;
  9 using org.apache.fop.apps;
 10 using org.xml.sax;
 11 using TechHeadBrothers.Portal.UI;
 12 using StringWriter = System.IO.StringWriter;
 13 
 14 #endregion
 15 
 16 namespace TechHeadBrothers.TechHeadBrothers.Portal.UI
 17 {
 18 	/// <summary>
 19 	/// Strategy to print PDF using FOP
 20 	/// </summary>
 21 	public class FOPPrintStrategy : PrintStrategy
 22 	{
 23 		#region Logging Definition
 24 
 25 		private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
 26 
 27 		#endregion	
 28 
 29 		protected override void Print(PrintArticle page, string xmlpath, string xslpah, XsltArgumentList xsltargs)
 30 		{
 31 			string fullFoDoc = XmlContentToFoContent(page, xmlpath, xslpah);
 32 
 33 			InputSource source = new InputSource(fullFoDoc);
 34 			ByteArrayOutputStream output = new ByteArrayOutputStream();
 35 
 36 			try
 37 			{
 38 				Driver driver = new Driver(source, output);
 39 				driver.setRenderer(Driver.RENDER_PDF);
 40 				driver.run();
 41 				output.close();
 42 
 43 				int sz = output.buf.Length;
 44 				byte[] pdf = new byte[sz];
 45 				for (int i = 0; i < sz; i++)
 46 					pdf[i] = (byte) output.buf[i];
 47 
 48 				page.Response.ClearHeaders();
 49 				page.Response.Clear();
 50 
 51 				page.Response.AddHeader("Content-Disposition", "attachment; filename=TechHeadBrothers.pdf");
 52 				page.Response.ContentType = "application/octet-stream";
 53 
 54 				page.Response.Flush();
 55 				page.Response.BinaryWrite(pdf);
 56 				page.Response.End();
 57 			}
 58 			catch (FOPException fope)
 59 			{
 60 				if (log.IsDebugEnabled)
 61 					log.Debug(fope.getMessage());
 62 			}
 63 		}
 64 }
Mar
16
2005

Updater Application Block–Version 2.0

The latest release of Updater Application Block, version 2.0, can be downloaded from Microsoft Download Center.

Updater Application Block, version 2.0, uses other application blocks included in patterns & practices Enterprise Library. The Updater Application Block uses the Configuration Application Block and the Cryptography Application Block. You can choose to use these in your application or just take them as part of the implementation of the updater. Enterprise Library was released in January 2005. To learn about and download Enterprise Library, use the following links:

[ Currently Playing : beautiful - Moby - hotel (03:12) ]

Mar
3
2005

Conversion from Visual Studio .Net 2003 to Visual Studio 2005

This evening (hum morning ;) I decided to give a try to the conversion wizard integrated in Visual Studio 2005 that let you import older 1.1 projects.
I choosed to import my whole website: Tech Head Brothers. You might see next the conversion report:

And the Error List report of a build :

I am impressed about the conversion. Ok I have 2 errors and 133 Warnings, but the warnings are all due to deprecated classes or obsolete methods and the two errors are:

  • Error 134 Program '\Projects\Tech Head Brothers Portal\Database\obj\Debug\Database.exe' does not contain a static 'Main' method suitable for an entry point Database
  • Error 135 Program '\Projects\Tech Head Brothers Portal\Docs\obj\Debug\Docs.exe' does not contain a static 'Main' method suitable for an entry point Docs

Next step is to get the DB in SQL Server 2005 and make some tests. But that the task for another day.

Tomorrow I will be at the French DevDays 2005 in Strasbourg, hope to meet you there.

Feb
10
2005

Omea Reader sending to Groove

I started to develop a plugin for Omea Reader, as you can read on the previous post.
This plugin lets you select an entry in Omea Reader and send it to a Groove Discussion tool.
I have used Groove Web Services Development Kit, and in an 2 hours effort I could have the first release of the plugin running.
I was searching for such a solution to send messages I read in newsgroups to Groove Discussion tool, so now I have one. For sure I have to finalize it first, but here is a first screenshot of the result:

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect and certified Scrum Master.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List