Just to clarify on this, in the vb code the string is being declared
correctly with the "+" symbol in it. It is on the transfer of the string into
the c# web service that things seem to be going wrong.
--
Scott
"scottrm" wrote:
[color=blue]
> Thanks for the reply, the strings did seem to be different, by one character,
> the string from the vb6 client seemed to have a blank character (U+0020)
> where there should have been a + symbol (U+002b). Any ideas on why this is
> happening?
>
> Have a good Christmas!
> --
> Scott
>
>
> "Jon Skeet [C# MVP]" wrote:
>[color=green]
> > scottrm <scottrm@newsgroup.nospam> wrote:[color=darkred]
> > > I have a asp.net web service built in c# which is accepting a string
> > > parameter from a vb6 client. The string parameter contains some xml. I am
> > > attempting to convert the string to a byte array using the
> > > Convert.FromBase64String function but get the following error.
> > >
> > > Invalid length for a Base-64 char array
> > >
> > > The same code works ok if I call it from an asp.net client. In that client I
> > > am just passing the parameter through as a standard string. Any ideas why
> > > the same is not working from the vb6 client?[/color]
> >
> > It sounds like you're not actually getting the same string. Check
> > whether you're getting a rogue null termination character at the end of
> > the string.
> >
> > I suggest you dump out the string in both the working and non-working
> > versions and compare them *very* carefully. (Compare the lengths
> > first!). See
> >
http://www.pobox.com/~skeet/csharp/strings.html
> > for some code you can grab to help you dump the strings out in a useful
> > way.
> >
> > --
> > Jon Skeet - <skeet@pobox.com>
> >
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
> > If replying to the group, please do not mail me too
> >[/color][/color]