473,396 Members | 1,767 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do I pass a variant byte array to a .NET web service?

I'm very confused with this. I have a .NET web service that I am trying
to pass a variant byte array to from the client side. If the signature
of the web service is set to accept an Object it seems to pass it in
but I can't access the array that should be in there. If I set the
signature as a byte array I get an error in webservice.htc. It seems to
be trying to encode the variable to base 64 and it fails when trying to
do a .length on it.

Am I supposed to convert this to Base64 or what? I would appreciate any
help with this as I am really in a jam.

Thanks

Alex

Mar 18 '06 #1
3 3785
Hi,
I've had a similar problem with passing byte arrays as parameters in my
web services.
The solution i used was to manually convert the array of bytes as a
base64 encoded string and pass the string. Decoding on the receive.
My investigations into the nullified byte array led me to make this
post:
http://groups.google.com/group/micro...363e45fbf92e3d
hope my 'fix' helps.

Mar 20 '06 #2
I found some vbscript code which converts my array to base64. When I
pass it as a string and use the .NET Convert.FromBase64String to decode
this string I get an array with different values in it. Is there more
than one standard when it comes to converting into base64? Maybe I need
to modify the script code to comply with the .NET function?

Any ideas?

Thanks

Mar 20 '06 #3
ab*******@gmail.com wrote:
I found some vbscript code which converts my array to base64. When I
pass it as a string and use the .NET Convert.FromBase64String to decode
this string I get an array with different values in it. Is there more
than one standard when it comes to converting into base64? Maybe I need
to modify the script code to comply with the .NET function?

Any ideas?


<URL:http://en.wikipedia.org/wiki/Base64>
F'up2 microsoft.public.dotnet.framework.aspnet (where I don't read)

PointedEars
Mar 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gene | last post by:
I'm not sure I understand this behavior (at least in the context of C#). I understand the use of "ref" and "out" keywords as they apply to method arguments, and then something this morning...
16
by: Ekim | last post by:
hello, I'm allocating a byte-Array in C# with byte byteArray = new byte; Now I want to pass this byte-Array to a managed C++-function by reference, so that I'm able to change the content of the...
2
by: Herbert VON GRÜNENWALD | last post by:
i'v got: public static extern int ReadFile( IntPtr hFile, IntPtr lpBuffer, uint nNumberOfBytesToRead, ref uint lpNumberOfBytesRead, uint lpOverlapped);
8
by: intrepid_dw | last post by:
Hello, all. I've created a C# dll that contains, among other things, two functions dealing with byte arrays. The first is a function that returns a byte array, and the other is intended to...
0
by: Metallicraft | last post by:
I have a vb6 DLL that creates a bitmap in memory and saves the file. then it reopens the bitmap to read it into a byte array. is there a way to pass the vb6 byte array to the calling asp.net...
3
by: simonc | last post by:
Can you define a property as type Byte array of a specific length? I am trying to pass a byte array which is 3200 bytes in length from one form (in which the bytes are read from a file) to...
3
by: abarberis | last post by:
I'm very confused with this. I have a .NET web service that I am trying to pass a variant byte array to from the client side. If the signature of the web service is set to accept an Object it seems...
1
by: kmercer46 | last post by:
I have the byte array generated and I also have the web service generated what i need to know is how to pass a byte array to the web service itself any help would be appreciated.
3
by: Beorne | last post by:
I have to pass a byte array as an input parameter to a function in a propertary dll. The c++ signature of the original function is the following: ---------- C++ ---------- int...
9
by: Leon_Amirreza | last post by:
How Can I cast a uint type to a byte? Does the following code do this? uint a = 5; byte b = new byte; b = (byte)a;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.