Wednesday, June 18, 2008

Deploying outlook 2007 VBA code using group policy with digital signature

1, write the code;
2, generate code signing certificate using enterprise CA;
3, Sign the macro code with certificate;
4, copy VBAProject.otm and the certificate to netlogin folder;
5, create GPO, link a logon script to copy vbaproject.otm to user profile and create a certificate rule to publish the certificate

Wednesday, June 11, 2008

Customizing MySite in MOSS and adding report viewer web part

The following two articles are definitely quite valuable information if you want to customize my site under moss/sharepoint 3.0:

Qhile following these instructions and added sql server 2000 report viewer web part, extra problems arose: while we can assign reportmanagerurl and reportpath to the report view web part, assigning string values to toolbarsize property and height/width property won't work. After examining rswebpart.dll file by using 'Reflector', it is clear that the web part won't accept string as input for toolbarsize property, instead it will only accept a typed variable.
Here is the solution(use the second link above as example):
under 'mysitecreatepart' project, add a reference to rswebpart.dll,
and add the following line on the top of partcheck.cs file:
using Microsoft.ReportingServices.SharePoint.UI.WebParts;
inside partcheck.cs's SetWebPartProperties method, add the following code into appropriate position:

// NOTE: Hack to get around the 'ambiguous match' error
// for the Height property.
if (String.Compare("Height",
wpa.Properties.Property[p].Key, true) == 0)
xWp.Height = wpa.Properties.Property[p].Value;
} //end height hack

//hack to setup toolbarsize property
if (String.Compare("ViewerToolbarSize",
wpa.Properties.Property[p].Key, true) == 0)
//I only need to get rid of toolbar thus use a static value here... xWp.GetType().GetProperty(wpa.Properties.Property[p].Key).SetValue(xWp,
SPViewer.ToolbarSize.None, null);
} //end toolbarsize hack

Tuesday, June 3, 2008


I learned JAVA EE programming a while ago and did some minor projects, unfortunately there is no real world chance to practise it and those little knowledge I learned at that time has been nearly thrown alway totally!
Anyway, at these days I occassionally write some code using, although it is quite easy to write a 'dirty' program using, It is definitely not a good practise. I have been trying to figure out the way to write a true multi-tier program using and came to a few discovery. Interesting, Hibernate got an version which is called NHibernate...However, I guess I might go for LINQ for ORM, however for MVC structure I only found a 'MVC framework CTP' stuff which is apparently not quite mature yet...

Also the following article has some discussion and comparison which could be useful:
ASP.NET MVC: Choosing Your Data Access Method