WEBfactory 2010

Debug operations

Abstract

Check out this article and learn more details about the WEBfactory 2010 Client SDK debug operations and the involved paramters.

OutputDebugText
Method Definition
void OutputDebugText(WFDebugLevel level, string textFormat,
  params object[] textFormatParams);
Calling Parameters
  • level Level of the message

  • textFormat Message with replacement phrases like {0}

  • textFormatParams Format parameters referenced in

Description

This method writes a message to WEBfactory debug trace file.

Parameter level is an enumeration:

public enum WFDebugLevel
{
    Hint,
    Warning,
    Error
}

The parameters textFormat and textFormatParams are used like they are used in string.Format() method.

CommunicationError
Event Definition
event OnCommunicationErrorEventHandler CommunicationError;
delegate void OnCommunicationErrorEventHandler(string serverName, Exception error, int result);
Calling Parameters
  • serverName WEBfactory Server

  • error Exception (can be null)

  • result Result of the webservice method

Description

Internally there is a communication between SDK core classes and WEBfactory Server. The CommunicationError event is fired when internal update operation of data provider fails.

serverName is necessary for multi server systems only. For a single server project it can be empty.

The error (type Exception) is a Silverlight error indicator for asynchronous operations. WEBfactory bypasses this exception to SDK users to make it easier to find communication errors.

The integer result may have one of the following values:

  • 0: Success

  • -1: Unknown Channel ID ? Re-connect, Re-register

  • -2: Communication Error

  • -3: DCOM Error

  • -5: Error Accessing the Data Base

  • -6: License Error

  • -8: Invalid Client Name or IP Address

  • -9: Invalid Channel ID

  • -11: Data Conversation Error

  • -12: Internal Authentication Error

  • -99: Unspecified Error

RegisterError
Event Definition
event OnRegisterErrorEventHandler RegisterError;
public delegate void OnRegisterErrorEventHandler(
  string serverName, Exception error, int result, 
  int[] signalResults, string[] signalNames);
Calling Parameters
  • serverName WEBfactory Server

  • error Exception (can be null)

  • result Result of the webservice method

  • signalResults Result of each register operation

  • signalNames Signal name of each register operation

Description

Internally each new registration of a signal change delegate will cause a register operation of a WEBfactory signal of the WEBfactory webservice.

The RegisterError event is fired when internal register operation of data provider fails.

serverName is necessary for multi server systems only. For a single server project it can be empty.

The error (type Exception) is a Silverlight error indicator for asynchronous operations. WEBfactory bypasses this exception to SDK users to make it easier to find communication errors.

The integer result may have one of the following values:

  • 0: Success

  • -1: Unknown Channel ID ? Re-connect, Re-register

  • -2: Communication Error

  • -3: DCOM Error

  • -5: Error Accessing the Data Base

  • -6: License Error

  • -8: Invalid Client Name or IP Address

  • -9: Invalid Channel ID

  • -11: Data Conversation Error

  • -12: Internal Authentication Error

  • -13: Obsolete method

  • -99: Unspecified Error

Each value of the integer array signalResults may have one of the following values:

  • 0: Success

  • 1: Success, but signal was already registered within this session

  • 2: Success, but signal is not “owned” by any server connector yet

These values are warnings only. Value 1 should normally not occur since data provider does not register same signal multiple times. A not started WEBfactory server or an unknown signal could be a possible cause for value 2.

The concerning signal name can be found inside the signalNames array.