473,386 Members | 1,644 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,386 software developers and data experts.

howto transfer chr(1) to a server via webservice


1.

How to pass chr(1) (or another special char below 32) to a method in a
webservice?
It raises an exception when I try to pass it through webservice.htc

2.
How to pass chr(255)
It doesn't raise an exception, but another character comes to the server
in some cases (different server= different results).. probably some
regional settings.
thanks a lot.




Nov 18 '05 #1
3 1435
How are you passing the data? These characters would be considered binary in
this case? In that case you'd have to use byte[] as the type to send the
data.

If you are sending string data you have to remember about string encodings.
It's possible that a client is running a specific encoding that is different
than the encoding on the server resulting in a possible mismatch.

You can explicitly convert to a specific encoding on the server side but
this may still cause problems if the client sent data that is locale
specific and you're not retrieving the data in the same locale. If both ends
are using pure Unicode encoding then there should be no problem.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
http://www.west-wind.com/wwThreads/
----------------------------------
Making waves on the Web
"ProJee" <pr****@metacreations.orgg> wrote in message
news:u0**************@TK2MSFTNGP09.phx.gbl...

1.

How to pass chr(1) (or another special char below 32) to a method in a
webservice?
It raises an exception when I try to pass it through webservice.htc

2.
How to pass chr(255)
It doesn't raise an exception, but another character comes to the server
in some cases (different server= different results).. probably some
regional settings.
thanks a lot.



Nov 18 '05 #2
Just an idea ..

Have a look at Server.HtmlEncode / HtmlDecode methods. Maybe it will work.
"ProJee" <pr****@metacreations.orgg> wrote in message
news:u0**************@TK2MSFTNGP09.phx.gbl...

1.

How to pass chr(1) (or another special char below 32) to a method in a
webservice?
It raises an exception when I try to pass it through webservice.htc

2.
How to pass chr(255)
It doesn't raise an exception, but another character comes to the server
in some cases (different server= different results).. probably some
regional settings.
thanks a lot.



Nov 18 '05 #3
thanks for the reply,

another question:

how can I convert a string in a variable (vbscript in IE6) to unicode
before it's sent to the server by webservice.htc?
ProJee

Rick Strahl [MVP] wrote:
How are you passing the data? These characters would be considered binary in
this case? In that case you'd have to use byte[] as the type to send the
data.

If you are sending string data you have to remember about string encodings.
It's possible that a client is running a specific encoding that is different
than the encoding on the server resulting in a possible mismatch.

You can explicitly convert to a specific encoding on the server side but
this may still cause problems if the client sent data that is locale
specific and you're not retrieving the data in the same locale. If both ends
are using pure Unicode encoding then there should be no problem.

+++ Rick ---

Nov 18 '05 #4

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

Similar topics

0
by: Daniel | last post by:
hi ng, i have a webservice method that provides a object array that i would like to bind with a datalist on client side. the problem is that a datalist needs property fields to bind to, but...
4
by: Weston Weems | last post by:
I've got the simple problem where I'd like to transfer somewhat large files to my webserver via http/webservice/something like that. My question is what kinda limits have people been able to...
2
by: dan | last post by:
hi ng. i have a asp.net application which is client of an asp.net webservice. now i want to configure a custom error page (in case the sewrvice throws an exception) that provides the...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
5
by: Topper | last post by:
Hello! How to create WebService without IIS and ASP.NET? For example, create WebService for smart device client without ASP.NET/IIS techology. Without ASP.NET and IIS - is a key question!! ...
8
by: Topper | last post by:
Hello. I have simple web folders structure: -ROOT - BIN WebService.dll WebService.asmx I need to use my WebService.dll not in bin folder - for example, in ROOT. How do i this? How can i do...
5
by: David++ | last post by:
Hi List, I would like to transfer files from my local machine to a remote server via a web service which runs on the remote server. Is this possible to do with a ..net web service? Ideally I...
2
by: Bonzol | last post by:
vb.net 2003 Windows application We have a Client/Server system set up by communicating through a TCPClient object. The server loops continuously using a tcplistener device and each time a client...
0
by: rdemyan | last post by:
I'm trying to use TransferDatabase to transfer tables from an external secured DB to a database created in the code. I would like to kind of use automation, although OpenCurrentDatabase apparantly...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.