none
Passing Photo in a workflow

    Question

  • Hi Guys,

    I'm using the Code Run activity workflow (http://fimactivitylibrary.codeplex.com/) where I'm using it to create an AD account.  I was trying to pass the [//Target/Photo] as an input parameter that contains the photo.  My code in the Code Run activity sets the thumbnailPhoto attribute.  The weird thing is that any it is not set at all.  I tried to capture the contents of the parameter in side the code and it look something like this:

    255; 216; 255; 224; 0; 16; 74; 70; 73; 70; 0; 1; 1; 1; 0; 96; 0; 96; 0; 0; 255; 219; 0; 67; 0; 2; 1; 1; 2; 1; 1; 2; 2; 2; 2; 2; 2; 2; 2; 3; 5; 3; 3; 3; 3; 3; 6; 4; 4; 3; 5; 7; 6; 7; 7; 7; 6; 7; 7; 8; 9; 11; 9; 8; 8; 10; 8; 7; 7; 10; 13; 10; 10; 11; 12; 12; 12; 12; 7; 9; 14; 15; 13; 12; 14; 11; 12; 12; 12; 255; 219; 0; 67; 1; 2; 2; 2; 3; 3; 3; 6; 3; 3; 6; 12; 8; 7; 8; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 12; 255; 192; 0; 17; 8; 0; 97; 0; 73; 3; 1; 34; 0; 2; 17; 1; 3; 17; 1; 255; 196; 0; 31; 0; 0; 1; 5; 1; 1; 1; 1; 1; 1; 0; 0; 0; 0; 0; 0; 0; 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 255; 196; 0; 181; 16; 0; 2; 1; 3; 3; 2; 4; 3; 5; 5; 4; 4; 0; 0; 1; 125; 1; 2; 3; 0; 4; 17; 5; 18; 33; 49; 65; 6; 19; 81; 97; 7; 34; 113; 20; 50; 129; 145; 161; 8; 35; 66; 177; 193; 21; 82; 209; 240; 36; 51; 98; 114; 130; 9; 10; 22; 23; 24; 25; 26; 37; 38; 39; 40; 41; 42; 52; 53; 54; 55; 56; 57; 58; 67; 68; 69; 70; 71; 72; 73; 74; 83; 84; 85; 86; 87; 88; 89; 90; 99; 100; 101; 102; 103; 104; 105; 106; 115; 116; 117; 118; 119; 120; 121; 122; 131; 132; 133; 134; 135; 136; 137; 138; 146; 147; 148; 149; 150; 151; 152; 153; 154; 162; 163; 164; 165; 166; 167; 168; 169; 170; 178; 179; 180; 181; 182; 183; 184; 185; 186; 194; 195; 196; 197; 198; 199; 200; 201; 202; 210; 211; 212; 213; 214; 215; 216; 217; 218; 225; 226; 227; 228; 229; 230; 231; 232; 233; 234; 241; 242; 243; 244; 245; 246; 247; 248; 249; 250; 255; 196; 0; 31; 1; 0; 3; 1; 1; 1; 1; 1; 1; 1; 1; 1; 0; 0; 0; 0; 0; 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 255; 196; 0; 181; 17; 0; 2; 1; 2; 4; 4; 3; 4; 7; 5; 4; 4; 0; 1; 2; 119; 0; 1; 2; 3; 17; 4; 5; 33; 49; 6; 18; 65; 81; 7; 97; 113; 19; 34; 50; 129; 8; 20; 66; 145; 161; 177; 193; 9; 35; 51; 82; 240; 21; 98; 114; 209; 10; 22; 36; 52; 225; 37; 241; 23; 24; 25; 26; 38; 39; 40; 41; 42; 53; 54; 55; 56; 57; 58; 67; 68; 69; 70; 71; 72; 73; 74; 83; 84; 85; 86; 87; 88; 89; 90; 99; 100; 101; 102; 103; 104; 105; 106; 115; 116; 117; 118; 119; 120; 121; 122; 130; 131; 132; 133; 134; 135; 136; 137; 138; 146; 147; 148; 149; 150; 151; 152; 153; 154; 162; 163; 164; 165; 166; 167; 168; 169; 170; 178; 179; 180; 181; 182; 183; 184; 185; 186; 194; 195; 196; 197; 198; 199; 200; 201; 202; 210; 211; 212; 213; 214; 215; 216; 217; 218; 226; 227; 228; 229; 230; 231; 232; 233; 234; 242; 243; 244; 245; 246; 247; 248; 249; 250; 255; 218; 0; 12; 3; 1; 0; 2; 17; 3; 17; 0; 63; 0; 247; 143; 218; 106; 28; 254; 210; 63; 16; 142; 122; 248; 151; 81; 255; 0; 210; 169; 43; 135; 198; 56; 244; 174; 211; 246; 155; 155; 31; 180; 151; 196; 33; 233; 226; 93; 75; 255; 0; 74; 164; 175; 154; 191; 108; 111; 218; 158; 199; 246; 100; 248; 105; 37; 243; 172; 115; 235; 23; 106; 201; 167; 90; 255; 0; 207; 87; 238; 255; 0; 133; 126; 207; 10; 240; 163; 133; 133; 74; 157; 151; 228; 126; 59; 58; 19; 173; 138; 149; 58; 125; 223; 230; 97; 126; 221; 63; 181; 254; 153; 251; 55; 248; 66; 223; 79; 120; 101; 187; 213; 53; 146; 66; 44; 77; 229; 172; 96; 119; 99; 235; 95; 156; 191; 29; 191; 107; 237; 67; 226; 150; 143; 5; 188; 58; 100; 86; 83; 203; 43; 52; 151; 113; 203; 155; 155; 197; 7; 238; 231; 186; 138; 228; 126; 40; 124; 89; 215; 254; 53; 248; 142; 227; 90; 215; 175; 238; 111; 175; 110; 100; 102; 82; 239; 132; 132; 49; 39; 3; 216; 103; 21; 206; 167; 134; 174; 175; 239; 33; 98; 211; 221; 78; 168; 17; 99; 83; 144; 20; 14; 8; 252; 43; 243; 60; 219; 62; 158; 38; 167; 44; 126; 3; 244; 140; 155; 33; 134; 26; 159; 52; 151; 190; 77; 39; 199; 61; 89; 116; 136; 172; 224; 190; 188; 22; 240; 50; 200; 129; 39; 144; 20; 111; 94; 43; 234; 47; 216; 195; 254; 10; 79; 174; 248; 27; 83; 143; 77; 241; 85; 237; 206; 175; 166; 72; 235; 12; 77; 60; 232; 130; 18; 120; 7; 39; 147; 248; 243; 95; 61; 120; 107; 246; 123; 241; 47; 141; 154; 71; 178; 209; 175; 174; 160; 67; 177; 222; 24; 50; 191; 86; 62; 181; 141; 241; 19; 224; 79; 136; 190; 29; 222; 148; 184; 211; 175; 82; 53; 85; 96; 222; 86; 2; 15; 74; 241; 176; 217; 212; 104; 98; 23; 179; 168; 123; 56; 172; 150; 85; 232; 63; 105; 76; 253; 198; 240; 175; 136; 96; 241; 87; 135; 45; 53; 43; 105; 4; 240; 222; 68; 146; 130; 24; 48; 96; 202; 8; 57; 29; 122; 245; 171; 172; 54; 177; 24; 198; 14; 49; 233; 95; 154; 63; 240; 78; 159; 248; 40; 43; 252; 29; 185; 177; 240; 95; 138; 149; 143; 135; 174; 37; 219; 21; 228; 175; 135; 177; 115; 198; 8; 236; 166; 191; 74; 44; 117; 24; 53; 171; 40; 110; 173; 101; 142; 123; 91; 148; 89; 97; 146; 62; 82; 68; 97; 149; 101; 246; 32; 130; 43; 245; 204; 167; 53; 167; 140; 167; 205; 29; 207; 201; 179; 28; 190; 166; 14; 167; 36; 246; 37; 162; 140; 99; 143; 74; 43; 210; 60; 211; 208; 127; 106; 15; 249; 56; 255; 0; 136; 63; 246; 50; 234; 63; 250; 85; 37; 126; 75; 127; 193; 73; 188; 107; 55; 199; 127; 218; 242; 195; 193; 250; 94; 90; 45; 2; 53; 211; 119; 255; 0; 122; 86; 62; 108; 178; 127; 219; 50; 74; 126; 21; 250; 205; 251; 79; 127; 201; 199; 252; 67; 255; 0; 177; 151; 82; 255; 0; 210; 169; 43; 242; 67; 80; 211; 228; 127; 248; 40; 127; 140; 18; 104; 188; 144; 218; 221; 211; 162; 249; 121; 220; 10; 100; 63; 227; 214; 190; 43; 140; 113; 21; 41; 229; 81; 246; 127; 202; 191; 35; 236; 184; 66; 132; 43; 103; 18; 85; 59; 191; 204; 245; 191; 131; 159; 177; 79; 135; 180; 253; 38; 201; 100; 180; 73; 164; 56; 243; 11; 157; 224; 241; 233; 218; 189; 207; 194; 191; 178; 71; 133; 108; 224; 139; 203; 240; 238; 149; 229; 166; 25; 92; 217; 198; 75; 31; 94; 107; 164; 248; 123; 99; 12; 81; 66; 75; 121; 164; 129; 158; 49; 158; 43; 216; 244; 213; 242; 180; 100; 34; 215; 32; 129; 131; 235; 197; 127; 38; 230; 57; 158; 38; 85; 90; 231; 63; 171; 242; 236; 14; 26; 20; 254; 3; 204; 172; 190; 16; 218; 105; 182; 209; 165; 189; 140; 16; 196; 153; 56; 138; 32; 0; 62; 152; 21; 228; 223; 30; 254; 13; 218; 248; 191; 69; 187; 134; 254; 0; 251; 151; 229; 103; 225; 215; 233; 95; 88; 65; 117; 36; 209; 172; 113; 193; 193; 83; 154; 242; 95; 138; 54; 209; 127; 164; 163; 12; 51; 130; 8; 244; 34; 188; 202; 56; 156; 76; 106; 123; 72; 29; 213; 233; 210; 149; 63; 103; 52; 126; 77; 126; 210; 63; 7; 100; 248; 67; 227; 150; 180; 51; 125; 167; 75; 191; 17; 201; 25; 147; 239; 194; 155; 201; 42; 62; 141; 95; 161; 191; 240; 75; 255; 0; 136; 82; 120; 227; 246; 78; 210; 109; 158; 70; 154; 251; 68; 154; 93; 54; 82; 122; 169; 67; 186; 60; 255; 0; 192; 100; 175; 146; 63; 224; 160; 214; 178; 166; 169; 163; 106; 49; 199; 27; 217; 125; 160; 195; 51; 31; 225; 32; 96; 87; 182; 255; 0; 193; 25; 224; 154; 79; 134; 126; 49; 144; 203; 190; 55; 213; 227; 68; 29; 131; 8; 70; 239; 214; 191; 166; 60; 56; 199; 213; 169; 42; 119; 254; 86; 127; 55; 120; 143; 128; 167; 66; 21; 26; 254; 100; 125; 166; 113; 147; 131; 145; 216; 210; 81; 25; 30; 89; 199; 78; 213; 29; 126; 194; 158; 135; 228; 79; 115; 208; 127; 105; 243; 191; 246; 144; 248; 132; 61; 60; 75; 169; 15; 252; 154; 146; 191; 57; 191; 105; 255; 0; 3; 77; 225; 255; 0; 248; 40; 69; 134; 173; 36; 71; 236; 90; 190; 133; 230; 172; 159; 222; 145; 71; 148; 227; 254; 248; 85; 175; 209; 95; 218; 110; 92; 126; 210; 63; 17; 7; 167; 137; 181; 47; 253; 42; 150; 190; 72; 253; 180; 60; 50; 31; 196; 254; 6; 215; 150; 61; 239; 167; 93; 75; 107; 35; 127; 118; 41; 33; 118; 111; 252; 127; 203; 175; 147; 226; 170; 87; 201; 84; 252; 151; 228; 125; 103; 8; 213; 255; 0; 133; 183; 234; 255; 0; 51; 138; 240; 214; 191; 227; 205; 26; 248; 106; 112; 120; 187; 194; 246; 179; 78; 51; 22; 147; 123; 107; 34; 24; 128; 233; 153; 4; 141; 130; 71; 125; 163; 232; 58; 87; 208; 223; 178; 231; 237; 113; 173; 93; 11; 157; 63; 199; 154; 86; 128; 165; 28; 44; 6; 202; 98; 194; 76; 244; 0; 158; 163; 222; 188; 43; 90; 248; 29; 7; 142; 111; 111; 166; 88; 96; 188; 180; 214; 108; 22; 210; 69; 149; 60; 192; 153; 195; 18; 191; 220; 111; 246; 171; 107; 77; 240; 5; 167; 195; 79; 11; 104; 246; 118; 145; 125; 154; 40; 46; 33; 80; 238; 50; 205; 16; 124; 18; 95; 248; 142; 239; 226; 239; 214; 191; 152; 113; 149; 240; 254; 197; 219; 227; 63; 169; 48; 88; 58; 242; 154; 168; 143; 119; 253; 173; 63; 105; 173; 83; 64; 240; 133; 206; 147; 224; 216; 244; 157; 10; 252; 156; 205; 61; 212; 94; 104; 141; 15; 247; 127; 218; 21; 241; 134; 179; 173; 104; 62; 46; 134; 225; 188; 69; 227; 191; 21; 235; 186; 188; 82; 254; 242; 230; 208; 155; 91; 61; 50; 71; 59; 118; 239; 95; 148; 182; 98; 198; 214; 230; 190; 133; 241; 14; 157; 39; 138; 190; 36; 37; 165; 220; 210; 74; 47; 33; 86; 127; 47; 153; 20; 168; 225; 133; 102; 248; 147; 246; 75; 182; 189; 159; 80; 184; 62; 108; 95; 218; 147; 125; 166; 241; 68; 123; 26; 253; 129; 221; 185; 207; 118; 207; 36; 250; 215; 14; 15; 52; 161; 78; 139; 246; 168; 233; 198; 101; 117; 42; 214; 83; 62; 84; 253; 169; 60; 49; 115; 63; 193; 91; 198; 145; 230; 188; 150; 212; 164; 144; 92; 76; 161; 164; 147; 12; 8; 102; 35; 130; 199; 118; 73; 28; 100; 215; 181; 255; 0; 193; 56; 62; 12; 221; 124; 5; 91; 173; 36; 222; 25; 87; 81; 211; 82; 254; 245; 31; 128; 179; 137; 72; 3; 254; 249; 243; 43; 51; 246; 147; 183; 138; 93; 42; 45; 41; 80; 109; 45; 12; 64; 3; 145; 129; 32; 108; 127; 192; 177; 250; 215; 185; 124; 25; 146; 47; 19; 124; 73; 241; 86; 185; 13; 135; 246; 125; 155; 67; 105; 167; 125; 159; 251; 147; 40; 149; 230; 253; 37; 142; 191; 80; 240; 227; 23; 94; 121; 149; 8; 83; 248; 31; 55; 228; 126; 97; 226; 54; 23; 15; 12; 171; 17; 82; 127; 26; 229; 183; 222; 122; 123; 46; 214; 35; 142; 14; 56; 233; 73; 76; 98; 89; 137; 39; 36; 245; 62; 180; 149; 253; 16; 182; 71; 243; 139; 122; 157; 223; 237; 65; 255; 0; 39; 33; 241; 19; 254; 198; 109; 75; 255; 0; 74; 229; 175; 1; 253; 161; 188; 48; 124; 77; 224; 37; 79; 34; 59; 137; 97; 184; 18; 32; 63; 193; 129; 214; 189; 235; 246; 161; 151; 31; 180; 143; 196; 65; 233; 226; 109; 75; 255; 0; 74; 165; 174; 4; 185; 149; 54; 149; 243; 17; 208; 163; 143; 99; 92; 88; 172; 23; 215; 50; 247; 135; 239; 21; 249; 29; 216; 44; 111; 212; 115; 5; 140; 237; 39; 249; 158; 101; 251; 51; 235; 182; 227; 70; 132; 93; 147; 35; 134; 59; 131; 116; 207; 124; 85; 239; 139; 90; 228; 119; 30; 42; 182; 150; 227; 204; 109; 46; 218; 69; 34; 24; 126; 239; 7; 169; 174; 10; 120; 199; 195; 31; 138; 55; 150; 23; 41; 34; 218; 249; 226; 120; 7; 252; 245; 129; 198; 113; 255; 0; 1; 38; 174; 232; 247; 214; 154; 71; 196; 80; 222; 42; 187; 213; 163; 209; 110; 215; 117; 165; 222; 147; 2; 75; 52; 50; 117; 33; 209; 248; 96; 107; 249; 15; 54; 202; 170; 80; 204; 106; 82; 168; 127; 100; 100; 89; 186; 197; 229; 240; 171; 67; 118; 107; 120; 251; 197; 154; 86; 189; 227; 120; 228; 210; 210; 242; 36; 91; 97; 10; 200; 178; 96; 7; 99; 187; 143; 198; 189; 19; 80; 248; 181; 53; 167; 130; 237; 205; 227; 165; 228; 142; 155; 93; 186; 184; 56; 231; 62; 249; 172; 95; 25; 223; 120; 18; 195; 193; 215; 23; 233; 63; 142; 102; 149; 152; 181; 180; 16; 233; 150; 214; 69; 217; 162; 4; 51; 25; 11; 199; 180; 255; 0; 178; 161; 189; 133; 121; 116; 114; 75; 163; 120; 54; 226; 238; 242; 242; 226; 115; 124; 193; 163; 138; 86; 12; 96; 29; 66; 146; 0; 7; 29; 50; 0; 233; 208; 87; 149; 137; 192; 211; 130; 247; 15; 95; 235; 56; 136; 107; 82; 7; 17; 241; 127; 86; 77; 79; 198; 22; 19; 203; 110; 110; 32; 150; 242; 40; 98; 136; 201; 143; 49; 158; 100; 25; 255; 0; 128; 249; 149; 244; 159; 193; 255; 0; 134; 237; 240; 183; 194; 247; 54; 207; 119; 45; 195; 222; 94; 61; 241; 12; 114; 16; 180; 97; 48; 62; 158; 85; 124; 241; 240; 235; 79; 63; 24; 190; 63; 105; 150; 196; 255; 0; 162; 120; 108; 127; 105; 92; 159; 246; 163; 249; 162; 63; 247; 240; 161; 255; 0; 182; 117; 245; 123; 74; 17; 136; 3; 128; 112; 43; 250; 39; 194; 204; 147; 217; 225; 30; 58; 175; 197; 45; 17; 252; 217; 226; 158; 121; 58; 152; 181; 129; 167; 240; 45; 101; 254; 46; 132; 146; 193; 137; 113; 156; 227; 189; 63; 201; 250; 213; 118; 155; 230; 90; 147; 206; 250; 215; 234; 199; 228; 151; 125; 78; 207; 246; 165; 151; 31; 180; 175; 196; 65; 233; 226; 109; 75; 255; 0; 74; 164; 174; 14; 53; 200; 14; 228; 128; 67; 51; 51; 244; 85; 21; 75; 246; 249; 253; 171; 126; 30; 252; 28; 253; 166; 126; 37; 69; 226; 31; 20; 105; 214; 183; 112; 248; 159; 83; 31; 100; 133; 132; 215; 4; 139; 185; 114; 54; 167; 32; 231; 177; 230; 190; 7; 253; 170; 127; 224; 170; 77; 227; 109; 6; 235; 195; 255; 0; 15; 97; 212; 116; 232; 46; 144; 197; 121; 171; 92; 161; 18; 249; 103; 141; 176; 198; 121; 93; 195; 169; 53; 231; 85; 206; 48; 120; 92; 36; 92; 167; 239; 217; 126; 71; 165; 75; 40; 196; 98; 177; 83; 92; 157; 95; 230; 123; 231; 198; 111; 137; 214; 191; 24; 223; 88; 255; 0; 132; 118; 17; 52; 94; 7; 187; 88; 166; 212; 7; 221; 184; 159; 238; 77; 10; 255; 0; 211; 53; 15; 24; 127; 246; 129; 168; 126; 24; 120; 219; 79; 241; 157; 138; 218; 106; 202; 200; 246; 175; 178; 72; 63; 140; 55; 64; 71; 227; 88; 31; 240; 77; 175; 1; 55; 138; 255; 0; 100; 11; 187; 24; 129; 251; 69; 255; 0; 218; 204; 114; 22; 201; 105; 213; 229; 150; 49; 158; 255; 0; 61; 186; 243; 91; 147; 252; 56; 138; 242; 75; 125; 74; 5; 104; 164; 151; 25; 242; 164; 195; 33; 29; 235; 249; 215; 196; 10; 254; 215; 22; 177; 19; 251; 122; 31; 209; 220; 9; 135; 250; 190; 6; 52; 40; 239; 7; 115; 212; 46; 126; 17; 165; 150; 154; 183; 211; 255; 0; 104; 93; 91; 64; 161; 202; 72; 248; 242; 198; 58; 215; 134; 254; 208; 63; 20; 18; 107; 152; 52; 93; 20; 25; 238; 110; 14; 2; 158; 118; 47; 99; 94; 159; 23; 133; 39; 241; 15; 134; 238; 77; 199; 136; 175; 204; 16; 69; 153; 17; 228; 224; 174; 43; 206; 60; 45; 224; 123; 56; 53; 233; 111; 173; 97; 63; 100; 135; 34; 38; 60; 153; 73; 232; 223; 143; 90; 248; 104; 78; 156; 38; 167; 216; 251; 172; 77; 74; 147; 247; 95; 83; 159; 240; 31; 142; 23; 246; 77; 214; 180; 79; 19; 235; 174; 207; 161; 248; 142; 226; 79; 15; 234; 215; 3; 253; 101; 172; 133; 68; 201; 58; 255; 0; 178; 164; 237; 53; 246; 62; 151; 172; 69; 226; 11; 56; 111; 109; 102; 138; 230; 214; 225; 22; 84; 150; 31; 245; 114; 171; 12; 134; 95; 98; 14; 71; 177; 175; 139; 191; 224; 165; 26; 43; 120; 107; 246; 87; 240; 117; 173; 208; 34; 226; 243; 84; 147; 81; 144; 122; 43; 172; 170; 163; 255; 0; 33; 215; 204; 127; 2; 191; 110; 175; 136; 223; 0; 244; 171; 125; 31; 71; 214; 146; 93; 34; 221; 203; 199; 107; 125; 110; 39; 138; 6; 254; 32; 25; 190; 101; 7; 209; 120; 175; 232; 46; 16; 207; 158; 15; 5; 10; 88; 173; 153; 252; 249; 198; 185; 18; 198; 99; 229; 87; 11; 186; 63; 93; 252; 255; 0; 78; 157; 168; 243; 235; 225; 127; 134; 255; 0; 240; 88; 216; 71; 151; 111; 227; 31; 8; 188; 18; 18; 1; 185; 210; 103; 102; 80; 61; 76; 114; 117; 250; 87; 163; 127; 195; 218; 126; 21; 255; 0; 115; 196; 255; 0; 248; 38; 183; 175; 185; 89; 254; 1; 235; 206; 124; 20; 178; 28; 98; 118; 228; 62; 65; 255; 0; 130; 163; 69; 159; 248; 41; 111; 237; 16; 125; 126; 38; 248; 147; 255; 0; 78; 183; 53; 225; 182; 208; 159; 49; 122; 215; 188; 255; 0; 193; 79; 98; 207; 252; 20; 171; 246; 137; 62; 191; 19; 124; 73; 255; 0; 167; 91; 154; 240; 155; 56; 79; 218; 63; 26; 252; 165; 179; 245; 35; 245; 83; 254; 9; 20; 172; 255; 0; 179; 142; 141; 34; 179; 134; 183; 212; 46; 37; 223; 252; 10; 82; 225; 91; 159; 248; 2; 201; 93; 247; 141; 252; 61; 109; 225; 207; 28; 106; 90; 101; 135; 147; 61; 162; 202; 205; 105; 52; 18; 111; 76; 110; 60; 17; 219; 142; 213; 231; 95; 240; 69; 221; 107; 205; 248; 28; 145; 121; 70; 81; 165; 248; 157; 252; 253; 253; 54; 170; 219; 76; 191; 248; 235; 189; 125; 137; 227; 63; 128; 90; 86; 162; 179; 223; 11; 102; 135; 86; 141; 26; 31; 50; 221; 182; 133; 120; 230; 96; 74; 183; 115; 229; 136; 139; 47; 253; 51; 53; 205; 158; 101; 11; 29; 130; 106; 63; 31; 67; 232; 242; 44; 123; 194; 213; 188; 190; 14; 167; 128; 183; 134; 44; 245; 237; 56; 45; 197; 168; 243; 83; 133; 192; 192; 172; 125; 99; 193; 198; 198; 88; 45; 99; 95; 47; 207; 117; 118; 204; 121; 12; 171; 252; 43; 254; 213; 123; 87; 132; 52; 187; 59; 133; 142; 214; 105; 109; 198; 160; 84; 48; 135; 110; 210; 233; 142; 25; 71; 96; 122; 129; 83; 205; 240; 150; 227; 88; 215; 47; 239; 109; 204; 74; 44; 97; 196; 43; 58; 249; 129; 190; 110; 120; 175; 201; 242; 204; 190; 171; 204; 105; 225; 170; 195; 224; 103; 233; 24; 220; 85; 37; 133; 157; 106; 125; 143; 133; 63; 224; 177; 122; 228; 218; 175; 195; 207; 0; 176; 183; 151; 79; 142; 233; 231; 69; 73; 100; 220; 234; 33; 140; 68; 29; 151; 177; 96; 249; 35; 222; 191; 61; 86; 41; 12; 140; 113; 140; 158; 157; 49; 95; 123; 127; 193; 100; 117; 231; 180; 214; 252; 25; 162; 205; 177; 26; 217; 181; 43; 201; 25; 23; 106; 148; 50; 71; 26; 168; 29; 134; 216; 159; 138; 248; 94; 238; 202; 93; 190; 97; 24; 35; 168; 244; 175; 216; 43; 105; 52; 143; 199; 171; 202; 245; 111; 220; 100; 81; 155; 136; 182; 75; 212; 112; 180; 207; 236; 138; 91; 105; 204; 146; 0; 122; 138; 189; 138; 204; 201; 159; 220; 109; 20; 81; 90; 8; 40; 162; 138; 0; 40; 162; 138; 0; 40; 162; 138; 0; 40; 162; 138; 0; 255; 217;

    Am I missing any kind of conversion here? 

     

    Tuesday, March 12, 2013 3:01 AM

Answers

  • Thanks Harold.  I've got it working.  Below  is the code so that people in the same situation will be able to solve it as well:

     if (securityPhoto != null)
                        {
                            newUser.Properties["thumbnailPhoto"].Add(GetBytesFromString(securityPhoto.ToString()));
                        }
    
    
    
     private static byte[] GetBytesFromString(string photo)
        {
            photo = photo.Replace(" ", "").Trim(";".ToCharArray());
    
            string[] holder = photo.Split(";".ToCharArray());
    
            byte[] myByteArray = new byte[holder.Length];
            int i = 0;
            foreach (string item in holder)
            {
                myByteArray[i++] = byte.Parse(item);
            }
    
         
            return myByteArray;
        }
    
    

    • Marked as answer by vmaceda Wednesday, March 13, 2013 12:33 AM
    Tuesday, March 12, 2013 8:35 PM

All replies

  • Looks like a byte array to me.

    [//Target/Photo] is a binary type so I guess it is a byte array the same as the contents of the .jpg or .bmp file you loaded it from.

    What are you doing with it?

    Tuesday, March 12, 2013 2:11 PM
  • Thanks Harold.  I've got it working.  Below  is the code so that people in the same situation will be able to solve it as well:

     if (securityPhoto != null)
                        {
                            newUser.Properties["thumbnailPhoto"].Add(GetBytesFromString(securityPhoto.ToString()));
                        }
    
    
    
     private static byte[] GetBytesFromString(string photo)
        {
            photo = photo.Replace(" ", "").Trim(";".ToCharArray());
    
            string[] holder = photo.Split(";".ToCharArray());
    
            byte[] myByteArray = new byte[holder.Length];
            int i = 0;
            foreach (string item in holder)
            {
                myByteArray[i++] = byte.Parse(item);
            }
    
         
            return myByteArray;
        }
    
    

    • Marked as answer by vmaceda Wednesday, March 13, 2013 12:33 AM
    Tuesday, March 12, 2013 8:35 PM