Monday, January 17, 2011

Checking .NET version in MSI

The Setup Project  in Visual Studio .Net provides  you a convenience way to check the pre-requisite .NET Framework version required before allowing your installation takes place. But, there are only limited .Net version that are available. See picture below for available .Net Framework versions.

image

For example, if you need to check .NET Framework 3.5 SP1, then the Setup Project can't check that for you. In this case, you need to write custom code to check the registry entry for 3.5 SP1. Refer to article below for the registry entries of .NET Framework.

How to determine which version and service pack levels of Microsoft .NET Framework are installed

Where Can I find the error logs?

Knowing the locations of log files comes very useful when you are facing issue and trying to troubleshoot.

AgilePoint Server:

[VirtualServerDirectory]\AgilePointServer\log, e.g. C:\BPMWebSite\AgilePointServer\log

 

SharePoint Integration v2:

  1. Check the log file location at the AgilePoint Configuration List in your SharePoint site.

image

  1. AgileConnector logs: [VirtualServerDirectory]\AgilePointServer\log\AgileConnector, e.g. C:\BPMWebSite\AgilePointServer\log\AgileConnector
  2. In some extreme cases, some errors will be logged at the Event Viewer.

SharePoint General Error

If you see a general error message at SharePoint, e.g. 'Unknown Error' with a 'Go back to site' link, see pictures below, you can see the full error thrown by SharePoint by modifying a few entries in the web.config of SharePoint web application, i.e. the stack trace, the debug mode and the custom error mode. Search and set following values. It will let you know exactly what failed. Remember to backup your web.config before any changes.

For SharePoint 2010, you need to modify this in two web.config files, i.e. the web.config of SharePoint web application root (e.g. C:\inetpub\wwwroot\wss\VirtualDirectories\12345YourPortNumber), and also the web.config under the layout folder (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS).

Do this:

  1. Set CallStack="true"
  2. Set debug="true"
  3. Set customErrors mode="Off"

For example:

<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">

<customErrors mode="Off" />

<compilation batch="false" debug="true">

 

General error page from SharePoint:

image

image

Tuesday, January 11, 2011

Failed to access system resource


System.InvalidOperationExceptions: Failed to access system resource., exception has been thrown by the target of an invocation at Ascentn.Workflow.WF8341.LicenseHandler.ReadLicenseFile(StringFileName) at Ascentn.Workflow.WF8341.LicenseValidator.Execute()
Ascentn.Workflow.WF8341.LicenseValidator.Validate()

This error message "Failed to access system resource" is a typical privilege issue for the account that is running the AP Server installer. As can be gleaned from the stack trace, the error is thrown at the point where it is about to read the "xx\Program Files\Common Files\Ascentn\AgilePoint Server.dat"  license file. The solution is, run the AP Server installer as a local administrator account (or "Run as administrator"), to be able to have access to the license file (xx\Program Files\Common Files\Ascentn\AgilePoint Server.dat). This should resolve the issue.

Trace:
------

System.InvalidOperationExceptions: Failed to access system resource., exception has been thrown by the target of an invocation at Ascentn.Workflow.WF8341.LicenseHandler.ReadLicenseFile(StringFileName) at Ascentn.Workflow.WF8341.LicenseValidator.Execute()
Ascentn.Workflow.WF8341.LicenseValidator.Validate()

Turn Off UAC while installing AP Server:
----------------------------------------

http://techontip.wordpress.com/2010/06/02/turn-off-user-account-control-in-windows-2008-r2/

OR

--> Control Panel -> Change User Account Control Settings -> Never Notify

Thursday, January 6, 2011

Upgrade SQL 2005 to SQL 2008

If you are planning up upgrade to your SQL instance for AgilePoint Server, is there any AgilePoint specific information that should be aware of? Is this supposed to simple as restoring a backup of 2005 database onto a 2008 instance?

Upgrading the database for AgilePoint Server is straight forward. You have to just restore 2005 backup on 2008. Once restore is done, you will have to associate the database in AgilePoint Server configuration to pick the latest database.

Wednesday, January 5, 2011

Set SPN

When to set SPN? Here is a quick summary. See AgilePoint Pre-Installation Guide for full details.

  AgilePoint Server SharePoint Server
NTLM No need to set SPN Default to NTLM, No need to set SPN
NTLM & Kerberos Need to set SPN Need to set SPN
Kerberos Need to set SPN Need to set SPN

 

Further reference:

How to configure IIS to support both the Kerberos protocol and the NTLM protocol for network authentication

Tuesday, January 4, 2011

AgilePoint Server Working Thread

A customer reported that AgilePoint Server working thread increases to 123 (it was about 1o before) with below warning message after applying v5.0 SP1.

 

Subject: Warning : AgilePoint configuration may need to be modified.

Dear System Administrator,
Database concurrent connections exceed 90% of max pool size (100).
For performance concern, AgilePoint configuration may need to be modified.

 

This is not related directly to v5.0 SP1 upgrade. It is just picking up the max Pool Size (from the netflow.cfg -> defaults to 100 if not configured) and compares it with the Maximum DB counter connections used (and not necessarily the current connection). This is just a warning massage suggesting that the ‘Max Pool Size’ value can be increased, but this does not indicate that the current connection is high. It is just that at some point in time it has reached a high (counter) value that exceeds 90% of the maximum pool size.

The tendency of  declaring high value threads of [ eventCap="200" workingCap="200" ] is, it consumes as much DB pool as possible and hence it artificially bloats the DB connections driven by the large pool of the Event Threads and Working Threads. The currently running processes is not really high  [1,267]  and hence they can manage by just using [ eventCap="50" workingCap="50" ], but if they insist on setting it at  [ eventCap="200" workingCap="200" ] then increase the ‘Max Pool Size’ value shall be increased accordingly.

image

Netflow.cfg:

<database vendor="MSSQLDatabase" connectingString="application name=AgilePoint Server;connection lifetime=5;Max Pool Size=200;min pool size=10;server=T500-ARNEL;database=APDB;trusted_Connection=yes" />

AP Server Configuration:

clip_image002[4]

 

clip_image002[6]

Refer to the AgilePoint Performance Optimization, Scalability and Tuning Guide for more details about AgilePoint Server tuning.

Monday, January 3, 2011

WFGridView Example

The goal of this article is to show you the example of using WFGridView control, which is not included in the AgilePoint User Guide. For other details, please refer to the AgilePoint User Guide. WFGridView is a control to handle repeating data. The repeating data is stored in a tree of repeating nodes in the form of XML.

  1. In Envision, define the repeating nodes structure in the XML schema of the process model. In this example, it is the Items hive. Each Item has childnodes for Name, Price and Quantity (Qty). See picture below for the repeating node structure. It is assumed that the process model is located under the Process Template folder of your ASP.NET project at this point. Save and close Envision.
    • image
  2. The newly added repeating nodes structure is now reflected in the schema.xsd
    • image
  3. In your ASPX page, drag and drop the WFGridView control to the location desired in the page.
  4. Configure the BindingName property of the WFGridView control by selecting the root node the the repeating nodes hive. In this example, it is "pd:FoodOrder/pd:Items" (Not "pd:FoodOrder/pd:Items/pd:Item").
    • image
  5. Also, add another button for inserting new rows to the WFGridView control. It is called btnAddRow with the display text as "Add Items" in this example.
  6. Implement below codes in the button click event for btnAddRow.

      protected void btnAddRow_Click(object sender, EventArgs e)
      {
          DataTable dt = this.WFGridView1.RepeatingSectionDataSource;
          DataRow dr = dt.NewRow();
          dr[0] = "Updated";
          dr["pd:Name"] = "Enter Name Here";
          dr["pd:Qty"] = "";
          dr["pd:Price"] = "";
          dt.Rows.InsertAt(dr, 0);
          this.WFGridView1.RepeatingSectionDataSource = dt;
          this.WFGridView1.EditIndex = 0;
          this.WFGridView1.BindRepeatingSectionDataSoure();
      }

  7. Here is the example of the HTML code for the WFGridView:

                <tr style="height:100%">
                    <td style="width: 366px">
                        <ap:WFGridView ID="WFGridView1" runat="server" AutoGenerateColumns="False" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" BindingName="/pd:FoodOrder/pd:Items" InnerXmlTemplate="PHBkOkl0ZW0geG1sbnM6cGQ9Imh0dHA6Ly93d3cuYXNjZW50bi5jb20vYnBtL1hNTFNjaGVtYSI+PHBkOk5hbWU+U3RyaW5nPC9wZDpOYW1lPjxwZDpRdHk+RGVjaW1hbDwvcGQ6UXR5PjxwZDpQcmljZT5TdHJpbmc8L3BkOlByaWNlPjwvcGQ6SXRlbT4=" ShowFooter="True" >
                            <Columns>
                                <asp:BoundField DataField="pd:Name" HeaderText="Name" />
                                <asp:BoundField DataField="pd:Qty" HeaderText="Qty" />
                                <asp:BoundField DataField="pd:Price" HeaderText="Price" />
                            </Columns>
                        </ap:WFGridView>
                        <asp:Button ID="btnAddRow" runat="server" OnClick="btnAddRow_Click" Text="Add Item" /></td>

                </tr>

Download the sample source code here.

image

image