Author: theonlyremedy | Posted on: 7/6/2009 4:27:08 AM | Views : 262

Here is my code :
Encoding enc = Encoding.ASCII;
.
.
.

public void ExceptionAlerts (string lps_MessageLabel, object lpo_MessageBody) { try {
 ls_MessageBody = enc.GetString((Byte[])lpo_MessageBody);

The problem is that GetString accepts only byte[] as input, I tried to cast Object lpo_MessageBody into byte array, I get this error "Unable to convert String to Byte[]" while executing the program. lpo_MessageBody is encoded, so i used "enc" to convert it into string, where enc is an instance of Encoding. lpo_MessageBody was passed as an argument for a rule from MSMQ Trigger.

Anyone got any solution?

...

Go to the complete details ...