Not logged in. · Lost password · Register
Forum: agsXMPP SDK Support RSS
Avatar
Koterpillar #1
Member since May 2007 · 32 posts · Location: Russia
Group memberships: Members
Show profile · Link to this post
Subject: TypeLoadException in SVN, but not in 0.92
I'm compiling the SVN version under the CF2, and when run, this:
  1. public class Mechanism : Element
  2.     {
  3.         public MechanismType MechanismType
  4.         {
  5.             get
  6.             {
  7.                 return GetMechanismType(this.Value); // <--
produces a TypeLoadException. However, the 0.92 release DLL doesn't...
Seems to be a bug in CF, but was there something special - or changed - in 0.92 that prevented it?
nebohodimo IM developer
This post was edited on 2007-05-18, 10:33 by Koterpillar.
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
hm strange,

did you compare the source file of the 0.92 and the SVN code?
I will take a look at this later.

Alex
Alexander Gnauck
AG-Software
Avatar
Alex #3
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
i was able to reproduce this problem. If i comment out all unneeded mechanisms in GetMechanismType then it's working which makes no sense. This looks like a CF bug to me.

  1. public static MechanismType GetMechanismType(string mechanism)
  2.         {
  3.             switch (mechanism)
  4.             {
  5.                 //case "KERBEROS_V4":
  6.                 //    return MechanismType.KERBEROS_V4;
  7.                 //case "GSSAPI":
  8.                 //    return MechanismType.GSSAPI;
  9.                 //case "SKEY":
  10.                 //    return MechanismType.SKEY;
  11.                 //case "EXTERNAL":
  12.                 //    return MechanismType.EXTERNAL;
  13.                 //case "CRAM-MD5":
  14.                 //    return MechanismType.CRAM_MD5;
  15.                 //case "ANONYMOUS":
  16.                 //    return MechanismType.ANONYMOUS;
  17.                 //case "OTP":
  18.                 //    return MechanismType.OTP;
  19.                 //case "GSS-SPNEGO":
  20.                 //    return MechanismType.GSS_SPNEGO;
  21.                 case "PLAIN":
  22.                     return MechanismType.PLAIN;
  23.                 //case "SECURID":
  24.                 //    return MechanismType.SECURID;
  25.                 //case "NTLM":
  26.                 //    return MechanismType.NTLM;
  27.                 //case "NMAS_LOGIN":
  28.                 //    return MechanismType.NMAS_LOGIN;
  29.                 //case "NMAS_AUTHEN":
  30.                 //    return MechanismType.NMAS_AUTHEN;
  31.                 case "DIGEST-MD5":
  32.                     return MechanismType.DIGEST_MD5;
  33.                 //case "9798-U-RSA-SHA1-ENC":
  34.                 //    return MechanismType.ISO_9798_U_RSA_SHA1_ENC;
  35.                 //case "9798-M-RSA-SHA1-ENC":
  36.                 //    return MechanismType.ISO_9798_M_RSA_SHA1_ENC;
  37.                 //case "9798-U-DSA-SHA1":
  38.                 //    return MechanismType.ISO_9798_U_DSA_SHA1;
  39.                 //case "9798-M-DSA-SHA1":
  40.                 //    return MechanismType.ISO_9798_M_DSA_SHA1;
  41.                 //case "9798-U-ECDSA-SHA1":
  42.                 //    return MechanismType.ISO_9798_U_ECDSA_SHA1;
  43.                 //case "9798-M-ECDSA-SHA1":
  44.                 //    return MechanismType.ISO_9798_M_ECDSA_SHA1;
  45.                 //case "KERBEROS_V5":
  46.                 //    return MechanismType.KERBEROS_V5;
  47.                 //case "NMAS-SAMBA-AUTH":
  48.                 //    return MechanismType.NMAS_SAMBA_AUTH;    
  49.                 case "X-GOOGLE-TOKEN":
  50.                     return MechanismType.X_GOOGLE_TOKEN;
  51.                 default:
  52.                     return MechanismType.NONE;
  53.             }
  54.         }

Alex
Alexander Gnauck
AG-Software
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP SDK Support RSS