For Programmers: Free Programming Magazines  


Home > Archive > Microsoft Webservices > March 2005 > WebException on 2003, not on XP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author WebException on 2003, not on XP
Tim Johnson

2005-03-10, 4:03 pm

I'm invoking a web service from C# program on a GPRS-equipped PDA. It
dials out and into a couple public boxes we have. When I do this into our
XP/SP2 box, it works. I see it dial, I see it invoke (via a logfile on the
server), I get my result. When I do this into our Windows 2003 Server box, I
get a web exception and no logfile record. And, oddest of all, if I cradle
the PDA to my laptop and invoke the service on the remote Windows 2003
server (over the internet but not dialing out, but using ActiveSync passthru
on my laptop which goes out over DSL), it also works! Can anyone think of
an explanation for this behavior? It doesn't make sense to us that W2003
does worse than XP/SP2!

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625



Kevin Spencer

2005-03-10, 4:03 pm

> It doesn't make sense to us that W2003 does worse than XP/SP2!

No it doesn't. In fact, the issue is that Windows Server 2003 is far more
secure by default. You have a permissions issue.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You S Is What You Get.

"Tim Johnson" <tjohnson@high-point.com> wrote in message
news:eaB8utYJFHA.4060@TK2MSFTNGP14.phx.gbl...
> I'm invoking a web service from C# program on a GPRS-equipped PDA. It
> dials out and into a couple public boxes we have. When I do this into our
> XP/SP2 box, it works. I see it dial, I see it invoke (via a logfile on
> the server), I get my result. When I do this into our Windows 2003 Server
> box, I get a web exception and no logfile record. And, oddest of all, if
> I cradle the PDA to my laptop and invoke the service on the remote Windows
> 2003 server (over the internet but not dialing out, but using ActiveSync
> passthru on my laptop which goes out over DSL), it also works! Can anyone
> think of an explanation for this behavior? It doesn't make sense to us
> that W2003 does worse than XP/SP2!
>
> --
>
> Tim Johnson
> High Point Software, Inc.
> www.high-point.com
> (503) 312-8625
>
>
>



Tim Johnson

2005-03-10, 4:03 pm

But if I had a permissions issue, why would it work to hit the 2003 server
from my PDA when it's cradled into my laptop, using exactly the same PDA app
and server web service?

Also a new bit of info - we determined that a PDA/phone using T-Mobile
(GPRS) gets in fine; a PDA/phone using Sprint (CDMA) gets a web exception.
Same PDA app, same web service, same W2003 box colocated at a hosting
company.

I'm not understanding this since it's all just HTTP port 80 stuff.
--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
news:uRWZH%23YJFHA.1176@TK2MSFTNGP15.phx.gbl...
>
> No it doesn't. In fact, the issue is that Windows Server 2003 is far more
> secure by default. You have a permissions issue.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> What You S Is What You Get.
>
> "Tim Johnson" <tjohnson@high-point.com> wrote in message
> news:eaB8utYJFHA.4060@TK2MSFTNGP14.phx.gbl...
>
>



Tim Johnson

2005-03-10, 4:03 pm

I should also add, I get these same behaviors whether I use a URL address
for the web service or a hard-coded IP address. It works and doesn't work
as described regardless of the address style used.

And one other very odd note - I can hits asmx test page in PocketIE on ANY
of the PDAs, using either URL or IP, and using either the GPRS or CDMA
connections. So if I can get the test page with PocketIE, and I can get the
service invoked when I'm cradled to a laptop, and I can get the service
invoked over GPRS, what's different about using CDMA? I'd assume it was
some kind of DNS issues except for the fact I can also fail over CDMA using
a hard IP address.

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
news:uRWZH%23YJFHA.1176@TK2MSFTNGP15.phx.gbl...
>
> No it doesn't. In fact, the issue is that Windows Server 2003 is far more
> secure by default. You have a permissions issue.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> What You S Is What You Get.
>
> "Tim Johnson" <tjohnson@high-point.com> wrote in message
> news:eaB8utYJFHA.4060@TK2MSFTNGP14.phx.gbl...
>
>



Kevin Spencer

2005-03-10, 4:03 pm

Hi Tim,

I may have spoken too soon. I didn't notice that you had said that the Web
Service worked from a PDA. You have quite a prickly problemn to solve. I
can't tell from your message whether the exception happened at the app
level, or at the SOAP level. What kind of debugging arae you using? If the
problem is with the Web Service itself, it could be the format of the SOAP
request. About the only thing I could recommend would be some serious
debugging. If you can, use a packet-sniffer to see the incoming SOAP
messages. Perhaps a clue will be in there.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You S Is What You Get.

"Tim Johnson" <tjohnson@high-point.com> wrote in message
news:%23dgTmYZJFHA.2936@TK2MSFTNGP15.phx.gbl...
>I should also add, I get these same behaviors whether I use a URL address
>for the web service or a hard-coded IP address. It works and doesn't work
>as described regardless of the address style used.
>
> And one other very odd note - I can hits asmx test page in PocketIE on ANY
> of the PDAs, using either URL or IP, and using either the GPRS or CDMA
> connections. So if I can get the test page with PocketIE, and I can get
> the service invoked when I'm cradled to a laptop, and I can get the
> service invoked over GPRS, what's different about using CDMA? I'd assume
> it was some kind of DNS issues except for the fact I can also fail over
> CDMA using a hard IP address.
>
> --
>
> Tim Johnson
> High Point Software, Inc.
> www.high-point.com
> (503) 312-8625
>
>
> "Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
> news:uRWZH%23YJFHA.1176@TK2MSFTNGP15.phx.gbl...
>
>



Tim Johnson

2005-03-10, 4:03 pm

Here's another clue.

I wrote a small app to hit 1 simple webservice in our suite of services on
the Windows 2003 server. I now see that I can hit over CDMA exactly 1 time
successfully. After that I get WebException every time.

It turns out we created 2 URLs for this same box, ie 2 host header values -
demo.company.com and www.demo.company.com. Now, it also turns out I get
this same works-one-time behavior FOR EACH URL, even though it's really the
same box. And, I get no failures when cradled. And the same app runs
perfectly on the desktop (with wifi connectivity to a DSL router) every
time. All this is very consistent and reproducible.

Does that clue ring any bells?

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
news:%23ot6%23zZJFHA.2132@TK2MSFTNGP14.phx.gbl...
> Hi Tim,
>
> I may have spoken too soon. I didn't notice that you had said that the Web
> Service worked from a PDA. You have quite a prickly problemn to solve. I
> can't tell from your message whether the exception happened at the app
> level, or at the SOAP level. What kind of debugging arae you using? If the
> problem is with the Web Service itself, it could be the format of the SOAP
> request. About the only thing I could recommend would be some serious
> debugging. If you can, use a packet-sniffer to see the incoming SOAP
> messages. Perhaps a clue will be in there.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> What You S Is What You Get.
>
> "Tim Johnson" <tjohnson@high-point.com> wrote in message
> news:%23dgTmYZJFHA.2936@TK2MSFTNGP15.phx.gbl...
>
>



Kevin Spencer

2005-03-10, 4:03 pm

Afraid not, Tim. You'll just have to debug it, unless someone else has an
idea.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You S Is What You Get.

"Tim Johnson" <tjohnson@high-point.com> wrote in message
news:eiTWYIaJFHA.3788@tk2msftngp13.phx.gbl...
> Here's another clue.
>
> I wrote a small app to hit 1 simple webservice in our suite of services on
> the Windows 2003 server. I now see that I can hit over CDMA exactly 1
> time successfully. After that I get WebException every time.
>
> It turns out we created 2 URLs for this same box, ie 2 host header
> values - demo.company.com and www.demo.company.com. Now, it also turns
> out I get this same works-one-time behavior FOR EACH URL, even though it's
> really the same box. And, I get no failures when cradled. And the same
> app runs perfectly on the desktop (with wifi connectivity to a DSL router)
> every time. All this is very consistent and reproducible.
>
> Does that clue ring any bells?
>
> --
>
> Tim Johnson
> High Point Software, Inc.
> www.high-point.com
> (503) 312-8625
>
>
> "Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
> news:%23ot6%23zZJFHA.2132@TK2MSFTNGP14.phx.gbl...
>
>



Tim Johnson

2005-03-10, 9:00 pm

Pulling out a little more info from the WebException (instead of just the
Exception), I get a Status of ProtocolError and a code of NotFound and a
description of "Not Found". All of which is to say the call works the 1st
time, but then somehow the same webservice cannot be found for all
subsequent calls. At least when using CDMA.

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


"Tim Johnson" <tjohnson@high-point.com> wrote in message
news:eiTWYIaJFHA.3788@tk2msftngp13.phx.gbl...
> Here's another clue.
>
> I wrote a small app to hit 1 simple webservice in our suite of services on
> the Windows 2003 server. I now see that I can hit over CDMA exactly 1
> time successfully. After that I get WebException every time.
>
> It turns out we created 2 URLs for this same box, ie 2 host header
> values - demo.company.com and www.demo.company.com. Now, it also turns
> out I get this same works-one-time behavior FOR EACH URL, even though it's
> really the same box. And, I get no failures when cradled. And the same
> app runs perfectly on the desktop (with wifi connectivity to a DSL router)
> every time. All this is very consistent and reproducible.
>
> Does that clue ring any bells?
>
> --
>
> Tim Johnson
> High Point Software, Inc.
> www.high-point.com
> (503) 312-8625
>
>
> "Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
> news:%23ot6%23zZJFHA.2132@TK2MSFTNGP14.phx.gbl...
>
>



Tim Johnson

2005-03-10, 9:00 pm

Yeah, the CDMA business is mediated by Sprint. I'm thinking I need to get
them to diagnose what they do between my cellular SOAP packets being sent
and their land-based connection over the Internet to my server box. Clearly
something gets changed after the 1st time making my server not know what
they're talking about.

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
news:eD15jdaJFHA.2764@tk2msftngp13.phx.gbl...
> Afraid not, Tim. You'll just have to debug it, unless someone else has an
> idea.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> What You S Is What You Get.
>
> "Tim Johnson" <tjohnson@high-point.com> wrote in message
> news:eiTWYIaJFHA.3788@tk2msftngp13.phx.gbl...
>
>



Kevin Spencer

2005-03-10, 9:00 pm

Good idea, Tim!

--

Kevin Spencer
Microsoft MVP
..Net Developer
What You S Is What You Get.

"Tim Johnson" <tjohnson@high-point.com> wrote in message
news:uxlhuwaJFHA.3184@TK2MSFTNGP09.phx.gbl...
> Yeah, the CDMA business is mediated by Sprint. I'm thinking I need to get
> them to diagnose what they do between my cellular SOAP packets being sent
> and their land-based connection over the Internet to my server box.
> Clearly something gets changed after the 1st time making my server not
> know what they're talking about.
>
> --
>
> Tim Johnson
> High Point Software, Inc.
> www.high-point.com
> (503) 312-8625
>
>
> "Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
> news:eD15jdaJFHA.2764@tk2msftngp13.phx.gbl...
>
>



Tim Johnson

2005-03-10, 9:00 pm

Update - we just figured out what it is. It appears the 1st call works
because Sprint leaves the host header values intact, ie the whole
www.company.com/asdf/myservice.asmx. However in the 2nd and subsequent
calls Sprint evidently strips off everything after the com. That means IIS
attempts to find my webservice in the default website, which on our machine
does not exist (we only have host-header-type websites). So what we found
was that in the log files for the default web site, all the 404's (page not
found) messages were there.

Problem - Sprint evidently screws up the host headers after the 1st call
Solution1 - Create a virtual directory off the default website pointing back
to where my service really resides.
Solution2 - don't use Sprint

--

Tim Johnson
High Point Software, Inc.
www.high-point.com
(503) 312-8625


"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
news:%23jT2HBbJFHA.688@TK2MSFTNGP10.phx.gbl...
> Good idea, Tim!
>
> --
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> What You S Is What You Get.
>
> "Tim Johnson" <tjohnson@high-point.com> wrote in message
> news:uxlhuwaJFHA.3184@TK2MSFTNGP09.phx.gbl...
>
>



Kevin Spencer

2005-03-10, 9:00 pm

Nice work, Tim. And thanks for sharing that info!

--

Kevin Spencer
Microsoft MVP
..Net Developer
What You S Is What You Get.

"Tim Johnson" <tjohnson@high-point.com> wrote in message
news:OVPciLbJFHA.2756@TK2MSFTNGP10.phx.gbl...
> Update - we just figured out what it is. It appears the 1st call works
> because Sprint leaves the host header values intact, ie the whole
> www.company.com/asdf/myservice.asmx. However in the 2nd and subsequent
> calls Sprint evidently strips off everything after the com. That means
> IIS attempts to find my webservice in the default website, which on our
> machine does not exist (we only have host-header-type websites). So what
> we found was that in the log files for the default web site, all the 404's
> (page not found) messages were there.
>
> Problem - Sprint evidently screws up the host headers after the 1st call
> Solution1 - Create a virtual directory off the default website pointing
> back to where my service really resides.
> Solution2 - don't use Sprint
>
> --
>
> Tim Johnson
> High Point Software, Inc.
> www.high-point.com
> (503) 312-8625
>
>
> "Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
> news:%23jT2HBbJFHA.688@TK2MSFTNGP10.phx.gbl...
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com