Wednesday, August 3, 2011

How to replace a file in MSI

Use msi2xml. For example, the file you want to replace is Test.dll and your MSI is TestMSI.MSI.

  1. This command extracts the MSI files:

    • msi2xml -c OutputDir TestMSI.MSI
  2. Open OutputDir and modify the file.

    • The extracted file names are some random numbers with no file extension, e.g. _132667984196873216. To identify the file you want to replace, open the TestMSI.xml generated by above command, then search for Test.dll and find the matching random number file name.

    • You may replace the file using the same random number file name. Modify the file size in TestMSI.xml too.

  3. To pack the files back to MSI:

    • xml2msi.exe -m TestMSI.xml

You need the -m to ignore the 'MD5 checksum test' that fails when an MSIs file(s) are modified.

From my observation, the file size of MSI reduces after running xml2msi, but all the contents are correct.

Friday, July 29, 2011

SharePoint Integration Upgrade

 

There are customers come to me that they are not able to upgrade their AgilePoint Integration for SharePoint.

On their Add\Remove Program, they have the entry for AgilePoint Integration for SharePoint with v5.0. But when they run the v5.0 Service Pack 1 (v5.0 SP1) or v5.0 Service Pack 2 (v5.0 SP2), the upgrade installer gives below error:

“Please install or upgrade to AgilePoint v5.0 before installing this upgrade.”

image

This is because, the customer first run the SharePoint Integration installer (the MSI file), which will add the entry to the Add\Remove Program. This gives an illusion that it seems SharePoint Integration has been installed correctly. After this, if the customer does not use the SharePointV2IntegrationSetup.exe to deploy the SharePoint solution files (.wsp files), but instead the customer choses to manually deploy the SharePoint solution files (.wsp) using standard SharePoint stsadm tool, then the upgrade installer of v5.0 SP1 or v5.0 SP2 will not be able to detect that the SharePoint Integration has been installed.

To solve this, I recommend the customer to use same approach when SharePoint Integration was first deployed, i.e. use the stsadm tool. The details of using the stsadm tool can be found at the AgilePoint Install Guide, but here is a quick look:

To upgrade the SharePoint machine manually, right-click and extract the installer file to obtain the solution files (.wsp) files at Net20\SharePointv2\. Now upgrade the 4 solution files (Ascentn.SharePoint.SettingsList.wsp, Ascentn.SharePoint.WebParts.wsp, Ascentn.SharePoint.WFIntegration.wsp, Ascentn.SharePoint.ListForm.wsp) individually using the command line example below:

stsadm -o upgradesolution -name

     Ascentn.SharePoint.SettingsList.wsp -filename

     Ascentn.SharePoint.SettingsList.wsp –immediate -allowgacdeployment

After upgrading the solution files, run this command:

stsadm -o copyappbincontent

 

This situation can easily happened when the person first installed the SharePoint Integration left the company and did not left any documentation about what he had done. I strongly recommend you to keep the documentation and records for each upgrade you have performed, so that you can pass on the info to the person who will be doing the next upgrade.

Tuesday, July 26, 2011

API and Event available in AgilePoint Express Edition

 

There are API and Event available in AgilePoint Express Edition.

It is about human task. In the real scenario/real world, when the task is assigned to someone, it does not mean assignee will start to work on the assignment immediately. AgilePoint captures the date assigned and date completed, but it does not keep the timestamp that assignee actually starts to work on the task.

API

In this enhancement, AgilePoint provides a new API ActivateWorkItem(workItemID, bool activate, string clientData) so, application can make web service call of this function to mark user starts working on the work. In some case, it could be captured when user open the form or other ways, for example, a button on the form because user might want to check the form first and then decide to start working immediately. If user regret, application can call same web service call and activate=false, which will deactivate the work item. Behind scene, when work item gets activated, the table WF_MANUAL_WORKITEMS.ACTIVATED_DATE will be set for activation, otherwise it will be reset if it is deactivated. Beside web service API, service API is also available.

EVENT for AgileWork and AgileExtender

ActivateWorkItem call would fire an event of ‘ActivateWorkItem’, currently AgileWork and AgileExtender is able to capture the event and take certain action.

Friday, July 22, 2011

Hiding AgilePoint Setting List Feature in MySite

 

AgilePoint Setting List is used to stored all the configuration info for AgilePoint Integration for SharePoint. The access to this list shall be limited to SharePoint Administrators only.

There is a case where some end users accidentally activate this feature at their personal site, i.e. Mysite. This adds additional AgilePointSettingUrl entry in the SharePoint web.config, which messes up the configuration for SharePoint Integration.

Here is how you can hide AgilePoint Setting List Feature in MySite, so that the users do not accidently activate or deactivate it. You can add an extra attribute Hidden="TRUE" in the feature.xml file of AgilePoint Settings List Feature to hide the feature from your end users.

The default location of the feature.xml is:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES\AgilePointSettingsListFeature\feature.xml

 

Here is the sample content of the feature.xml. Add the Hidden="TRUE" at the Feature node.

<?xml version="1.0" encoding="utf-8" ?>

<Feature  Id="A379136F-8742-4f0c-9D5A-9310A4D2B80C"

                                  Title="$Resources:Feature_Title"

                                  Description="$Resources:Feature_Description"

                                  ImageUrl="AgilePoint\AgilePoint_Feature_logo.jpg"

                                  Version="12.0.0.0"

                                  Scope="Site"

                                  ReceiverAssembly="Ascentn.SharePoint.SettingsList, Version=1.0.0.0, Culture=neutral,

PublicKeyToken=f1099b605f3ea558"

                                  ReceiverClass="Ascentn.SharePoint.SettingsList.AgilePointSettingsFeatureReceiver"

                                  xmlns="http://schemas.microsoft.com/sharepoint/"

                  Hidden="TRUE">

                <ElementManifests>

                                <ElementManifest Location="ListTemplates\AgilePointSettingsElements.xml" />

                </ElementManifests>

</Feature>

Hyper-V Errors

The issue:

This happened after converting a vhd from Virtual Server 2005 to Hyper-V.

Projects in Visual Studio.NET 2008 can be built. No error message. The devenv.exe process occupied almost 100% of the CPU and keep running forever.

The attamp to repair Visual Studio 2008 does not help, but instead below error is shown.

“The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2908.”

clip_image001

Here is another error encountered.

“The procedure entry point CorGetSvc could not be located in the dynamic link library mscoree.dll”

clip_image002

The solution:

Go to Add/Remove Program, repair .NET Framework 3.5 SP1.

Configuring Windows Service (WCF) AgilePoint Server

 

There is one tricky step in configuring the Windows Service version of AgilePoint Server.

After installing the AgilePoint Server, you launch the AgilePoint Server Manager below to enter the configuration info.

image

Once you are done with entering all the info and click the ‘Update’ button, it might freeze for a while and finally display below error.

 image

This means something is preventing the Server Manager Configuration tool to enter the WCF binding elements into the web.config of Enterprise Manager. To solve this, launch the Windows Service Client Utility Tool from below default location

C:\Program Files\AgilePoint\AgilePoint Server\SVCUtilityTool\AgilePointWindowsServiceClientUtilityTool.exe

image

For the ‘Service address’ textbox, enter the http URL of AgilePoint Server. This is the tricky part. The port number shall be used in this URL is the http port number of AgilePoint Server that you entered in the AgilePoint Server Manager UI (see picture above), not the port number for Enterprise Manager.

Note that for IIS version of AgilePoint Server, the AgilePoint Server and the Enterprise Manager have to be installed at the same port number. But for Windows Service version of AgilePoint Server, the http ports of AgilePoint Server and Enterprise Manager can be different.

For the ‘Target Config’ textbox, enter the location of web.config of Enterprise Manager. Since you select a site for Enterprise Manager at the AgilePoint Server Manager tool, you can check the location of the virtual directory of the site at IIS Manager.

Click the ‘Generate’ button after this. It might take a while to execute.

If you see this error:

“The config was not generated, please check the Service address”,

image

then just launch the Services console and make sure the credential you use to run the windows service is right (Right click the AgilePoint service in the Services Console > Property > Log On tab). You might need to re-enter the username and password.

image

image

Then start the AgilePoint Server service (Right click the AgilePoint service in the Services Console > Start).

image

Also, check to make sure the path of the Enterprise Manager web.config is correct.

After this, launch the AgilePoint Windows Service Client Utility Tool and try again.

Thursday, July 21, 2011

Referencing AgilePoint Web Service

I was asked this question:

I am trying to reference the Ascentn Web Service per the documentation:

http://myserver:9000/AgilePointServer/Workflow.asmx?WSDL

I first referenced the web service as a "Web Reference", according to the instructions here:

http://crm.davidyack.com/journal/2007/10/21/referencing-web-services-with-visual-studio-2008.html

But, when I compile the proxy, I get all sorts of "duplicate definition" errors. For example:

"The namespace Workflow.Workflow already contains a definition for category".

I then referenced the web service as a "Service Reference", the Visual Studio 2008 default. However, I still get similar errors when compiling the proxy.

Suggestions?

By default, the option of Web Reference is not displayed in the Solution Explorer. As mentioned in the link, right click “Service Reference”, then choose “Add Service Reference ..”, do not enter the WSDL URL in the “Add Service Reference” windows, but instead, click on the “Advance” button at the bottom of the windows. Then, click on “Add Web Reference” on the next screen. After that, just enter the AgilePoint web service URL, click “Go” then add the web reference.

clip_image002

clip_image004

clip_image006