472,143 Members | 1,111 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Pocket PC - Unable to read data from the transport connection

Hello,

We have a Pocket PC client application which just connects to our
webservice. When a client connects his Pocket PC through his WIFI he gets
the following- Unable to read data from the transport connection .

I have the same setup and am unable to reproduce this problem. This method
just tests the webmethod with a helloworld returned.

Any help is greatly appreciated.

-Jay Balapa

Sample Code -

try

{

Cursor.Current = Cursors.WaitCursor;

PocketInspector.localhost.PocketService mySrv=new
PocketInspector.localhost.PocketService();

mySrv.Url="http://"+DatabaseGateway.ServerNameString+"/pocketservice.asmx";

string myString=mySrv.TestWebService();

MessageBox.Show(myString);

Cursor.Current = Cursors.Default;

}

catch(WebException err)

{

MessageBox.Show("This program is expected to throw WebException on
successful run."+

"\n\nException Message :" + err.Message);

if(err.Status == WebExceptionStatus.ProtocolError)

{

MessageBox.Show("Status Code : {0}",
((HttpWebResponse)err.Response).StatusCode.ToStrin g());

MessageBox.Show("Status Description : {0}",
((HttpWebResponse)err.Response).StatusDescription) ;

}

}


Jul 3 '07 #1
7 2982
This could be any number of things.

I am assuming you are using a WSDL generated proxy object. The first thing
that springs to mind is the Timeout property, are you setting this to a
sensible value?

Does the customer have a proxy server?
--
Simon Hart
http://simonrhart.blogspot.com
"Jay Balapa" wrote:
Hello,

We have a Pocket PC client application which just connects to our
webservice. When a client connects his Pocket PC through his WIFI he gets
the following- Unable to read data from the transport connection .

I have the same setup and am unable to reproduce this problem. This method
just tests the webmethod with a helloworld returned.

Any help is greatly appreciated.

-Jay Balapa

Sample Code -

try

{

Cursor.Current = Cursors.WaitCursor;

PocketInspector.localhost.PocketService mySrv=new
PocketInspector.localhost.PocketService();

mySrv.Url="http://"+DatabaseGateway.ServerNameString+"/pocketservice.asmx";

string myString=mySrv.TestWebService();

MessageBox.Show(myString);

Cursor.Current = Cursors.Default;

}

catch(WebException err)

{

MessageBox.Show("This program is expected to throw WebException on
successful run."+

"\n\nException Message :" + err.Message);

if(err.Status == WebExceptionStatus.ProtocolError)

{

MessageBox.Show("Status Code : {0}",
((HttpWebResponse)err.Response).StatusCode.ToStrin g());

MessageBox.Show("Status Description : {0}",
((HttpWebResponse)err.Response).StatusDescription) ;

}

}


Jul 3 '07 #2
Hi Simon,

Thanks for your quick response.

Customer does not have a proxy server.

What baffles me is that if the customer connects through ActiveSync then it
works.

-Jay


"Simon Hart" <sr*******@yahoo.comwrote in message
news:D0**********************************@microsof t.com...
This could be any number of things.

I am assuming you are using a WSDL generated proxy object. The first thing
that springs to mind is the Timeout property, are you setting this to a
sensible value?

Does the customer have a proxy server?
--
Simon Hart
http://simonrhart.blogspot.com
"Jay Balapa" wrote:
>Hello,

We have a Pocket PC client application which just connects to our
webservice. When a client connects his Pocket PC through his WIFI he gets
the following- Unable to read data from the transport connection .

I have the same setup and am unable to reproduce this problem. This
method
just tests the webmethod with a helloworld returned.

Any help is greatly appreciated.

-Jay Balapa

Sample Code -

try

{

Cursor.Current = Cursors.WaitCursor;

PocketInspector.localhost.PocketService mySrv=new
PocketInspector.localhost.PocketService();
mySrv.Url="http://"+DatabaseGateway.ServerNameString+"/pocketservice.asmx";

string myString=mySrv.TestWebService();

MessageBox.Show(myString);

Cursor.Current = Cursors.Default;

}

catch(WebException err)

{

MessageBox.Show("This program is expected to throw WebException on
successful run."+

"\n\nException Message :" + err.Message);

if(err.Status ==
WebExceptionStatus.ProtocolError)

{

MessageBox.Show("Status Code : {0}",
((HttpWebResponse)err.Response).StatusCode.ToStri ng());

MessageBox.Show("Status Description : {0}",
((HttpWebResponse)err.Response).StatusDescription );

}

}



Jul 3 '07 #3
Hello,

I think the problem are connection settings for device, if it works through
ActiveSync and not through WiFi so maybe check first if client have
connection to Internet.
I had similar problem and changing settings on location "Start ->
Settings -Connections -Advanced -Select Networks" resolved all my
problems.
"Jay Balapa" <jb*****@hotmail.comwrote in message
news:uU*************@TK2MSFTNGP04.phx.gbl...
Hello,

We have a Pocket PC client application which just connects to our
webservice. When a client connects his Pocket PC through his WIFI he gets
the following- Unable to read data from the transport connection .

I have the same setup and am unable to reproduce this problem. This method
just tests the webmethod with a helloworld returned.

Any help is greatly appreciated.

-Jay Balapa

Sample Code -

try

{

Cursor.Current = Cursors.WaitCursor;

PocketInspector.localhost.PocketService mySrv=new
PocketInspector.localhost.PocketService();
mySrv.Url="http://"+DatabaseGateway.ServerNameString+"/pocketservice.asmx";

string myString=mySrv.TestWebService();

MessageBox.Show(myString);

Cursor.Current = Cursors.Default;

}

catch(WebException err)

{

MessageBox.Show("This program is expected to throw WebException on
successful run."+

"\n\nException Message :" + err.Message);

if(err.Status == WebExceptionStatus.ProtocolError)

{

MessageBox.Show("Status Code : {0}",
((HttpWebResponse)err.Response).StatusCode.ToStrin g());

MessageBox.Show("Status Description : {0}",
((HttpWebResponse)err.Response).StatusDescription) ;

}

}


Jul 4 '07 #4
Hi Jay,

we have face same problem, and then we first request client to check
internet connection from his device's browser.
meaning that, from device internet explorer whether he is able to
fetch the web service url ok or not....
and in our case that solved the problem...

other day, the second problem has come that is because slow internet
connections...at the time of sending 400 kb data to web service,
because of slow connection server was not responding ok...

checkout these options, might be helpful to you....

All the best :)
On Jul 4, 2:13 am, "Jay Balapa" <jbal...@hotmail.comwrote:
Hello,

We have a Pocket PC client application which just connects to our
webservice. When a client connects his Pocket PC through his WIFI he gets
the following- Unable to read data from the transport connection .

I have the same setup and am unable to reproduce this problem. This method
just tests the webmethod with a helloworld returned.

Any help is greatly appreciated.

-Jay Balapa

Sample Code -

try

{

Cursor.Current = Cursors.WaitCursor;

PocketInspector.localhost.PocketService mySrv=new
PocketInspector.localhost.PocketService();

mySrv.Url="http://"+DatabaseGateway.ServerNameString+"/pocketservice.asmx";

string myString=mySrv.TestWebService();

MessageBox.Show(myString);

Cursor.Current = Cursors.Default;

}

catch(WebException err)

{

MessageBox.Show("This program is expected to throw WebException on
successful run."+

"\n\nException Message :" + err.Message);

if(err.Status == WebExceptionStatus.ProtocolError)

{

MessageBox.Show("Status Code : {0}",
((HttpWebResponse)err.Response).StatusCode.ToStrin g());

MessageBox.Show("Status Description : {0}",
((HttpWebResponse)err.Response).StatusDescription) ;

}

}

Jul 4 '07 #5
Check that the device does in fact have a valid IP address when connected via
Wi-Fi.

Also try doing what some of the other posters sugested such as ensuring you
can access the Web Service WSDL or ASMX page via Pocket IE.

If you are able to connect to the Web Service via Pocket IE (able to see Web
Methods) then it is likely to be a coding error.

--
Simon Hart
http://simonrhart.blogspot.com
"Jay Balapa" wrote:
Hi Simon,

Thanks for your quick response.

Customer does not have a proxy server.

What baffles me is that if the customer connects through ActiveSync then it
works.

-Jay


"Simon Hart" <sr*******@yahoo.comwrote in message
news:D0**********************************@microsof t.com...
This could be any number of things.

I am assuming you are using a WSDL generated proxy object. The first thing
that springs to mind is the Timeout property, are you setting this to a
sensible value?

Does the customer have a proxy server?
--
Simon Hart
http://simonrhart.blogspot.com
"Jay Balapa" wrote:
Hello,

We have a Pocket PC client application which just connects to our
webservice. When a client connects his Pocket PC through his WIFI he gets
the following- Unable to read data from the transport connection .

I have the same setup and am unable to reproduce this problem. This
method
just tests the webmethod with a helloworld returned.

Any help is greatly appreciated.

-Jay Balapa

Sample Code -

try

{

Cursor.Current = Cursors.WaitCursor;

PocketInspector.localhost.PocketService mySrv=new
PocketInspector.localhost.PocketService();
mySrv.Url="http://"+DatabaseGateway.ServerNameString+"/pocketservice.asmx";

string myString=mySrv.TestWebService();

MessageBox.Show(myString);

Cursor.Current = Cursors.Default;

}

catch(WebException err)

{

MessageBox.Show("This program is expected to throw WebException on
successful run."+

"\n\nException Message :" + err.Message);

if(err.Status ==
WebExceptionStatus.ProtocolError)

{

MessageBox.Show("Status Code : {0}",
((HttpWebResponse)err.Response).StatusCode.ToStrin g());

MessageBox.Show("Status Description : {0}",
((HttpWebResponse)err.Response).StatusDescription) ;

}

}




Jul 4 '07 #6
Simon,

Thanks for your respose.

I have already done most of what you have suggested. Actually those
are all our standard troubleshooting procedures.

I can guarantee that there is no coding errors because we have been
using this application for 2 years and method is a simple hello world
handshake.

I have even simulated a wifi in our end and have worked flawlessly.

Two things I have to look into is timeouts and slow internet
connection.

-Jay Balapa



Jul 4 '07 #7
I have found this solution doing some research and this could be the
solution-
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>
Reply | New Topic | This is SPAM | This is Offensive
Re: Cannot connect within Firewall

We've encountered this with a few "smart" firewalls that are more
restrictive than just allowing all traffic through a port.
Specifically, some firewalls look at HTTP traffic and validate the
headers sent across are known and allowed.

So, when using webservice calls, the soap request is issuing requests
to the server that fall outside the normal POST/GET etc... and the
firewall denies them.

The setting we've had to change on a Checkpoint firewall product is to
enable "Allow Unknown Headers" or something similar to this.

Of course, you could also be running into an http proxy scenario,
which
introduces several other possible variables. Check your desktop
computer on the network and see if the browser is configured to use a
proxy of any kind. Depending on the type of proxy, and whether you are
using Activesync or Wifi/other, there are usually ways to make this
work as well.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>


Jul 4 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Oliver Huppert | last post: by
reply views Thread by leo001 | last post: by

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.