Pocket PC - Unable to read data from the transport connection

Discussion in 'ASP .Net Web Services' started by Jay Balapa, Jul 3, 2007.

  1. Jay Balapa

    Jay Balapa Guest

    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.ToString());

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

    }

    }
    Jay Balapa, Jul 3, 2007
    #1
    1. Advertising

  2. Jay Balapa

    Simon Hart Guest

    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.ToString());
    >
    > MessageBox.Show("Status Description : {0}",
    > ((HttpWebResponse)err.Response).StatusDescription);
    >
    > }
    >
    > }
    >
    >
    >
    >
    >
    Simon Hart, Jul 3, 2007
    #2
    1. Advertising

  3. Jay Balapa

    Jay Balapa Guest

    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" <> wrote in message
    news:D...
    > 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.ToString());
    >>
    >> MessageBox.Show("Status Description : {0}",
    >> ((HttpWebResponse)err.Response).StatusDescription);
    >>
    >> }
    >>
    >> }
    >>
    >>
    >>
    >>
    >>
    Jay Balapa, Jul 3, 2007
    #3
  4. 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" <> wrote in message
    news:...
    > 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.ToString());
    >
    > MessageBox.Show("Status Description : {0}",
    > ((HttpWebResponse)err.Response).StatusDescription);
    >
    > }
    >
    > }
    >
    >
    >
    >
    Maciej Wolniewicz, Jul 4, 2007
    #4
  5. 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" <> 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.ToString());
    >
    > MessageBox.Show("Status Description : {0}",
    > ((HttpWebResponse)err.Response).StatusDescription);
    >
    > }
    >
    > }
    Harsh Trivedi, Jul 4, 2007
    #5
  6. Jay Balapa

    Simon Hart Guest

    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" <> wrote in message
    > news:D...
    > > 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.ToString());
    > >>
    > >> MessageBox.Show("Status Description : {0}",
    > >> ((HttpWebResponse)err.Response).StatusDescription);
    > >>
    > >> }
    > >>
    > >> }
    > >>
    > >>
    > >>
    > >>
    > >>

    >
    >
    >
    Simon Hart, Jul 4, 2007
    #6
  7. Jay Balapa

    Guest

    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, 2007
    #7
  8. Jay Balapa

    Guest

    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, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S2VpdGggQXZlcnk=?=

    Unable to read data from the transport connection

    =?Utf-8?B?S2VpdGggQXZlcnk=?=, Oct 12, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    4,601
    =?Utf-8?B?S2VpdGggQXZlcnk=?=
    Dec 30, 2005
  2. Mentalis
    Replies:
    0
    Views:
    5,264
    Mentalis
    Jul 12, 2006
  3. Replies:
    4
    Views:
    27,608
    karlitros
    Jul 5, 2007
  4. Jay Balapa
    Replies:
    7
    Views:
    3,082
  5. ninjamonkey
    Replies:
    4
    Views:
    774
    ninjamonkey
    Sep 11, 2007
Loading...

Share This Page