PC Review


Reply
Thread Tools Rate Thread

Couldn't Access Webservice on localhost

 
 
Krishna
Guest
Posts: n/a
 
      1st Oct 2003
Hi All,

Here follows the scinario of my problem :

Step 1:
Created a sample webservice on the localhost with the name HelloWorld.
And the url to acccess this services is like this.
http://localhost/WSTest/HelloWorld.asmx

and it contains only one method mHelloWorld().. which returns "Hello World"
string.

Step 2:

Created a client application (Smart device application) that consumes the
above created service.

Using the Add Webreference from the Project toolbar.. added the service to
the client and created the necessary code to access it.

Step 3:

After successfull compilation and deployment in both emulator as well as in
Pocket Pc Device.. i got the following error.

An unhandled exception of type 'System.Net.WebException' occurred in
System.Web.Services.dll

Additional information: Unable to connect to the remote server

The configurations of the dev. env. as follows:

VS .NET 2003 Ent

Emulator: Pocket PC 2002

Device: iPAQ 3700 - Pocket PC v 3.0.11171..

Thanks.. in advance....

Regards,

Krishna. Akula




 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      1st Oct 2003
This is because whether your device is a separate physical device or a
"virtual" device in the case of the emulator it is not the same machine as
the desktop pc. localhost is used to reference the machine on which the
request is initiated - you need to replace this with the IP address or
machine name of the PC on which the webservice is hosted.


Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

"Krishna" <(E-Mail Removed)> wrote in message
news:Oe9SIQ%(E-Mail Removed)...
> Hi All,
>
> Here follows the scinario of my problem :
>
> Step 1:
> Created a sample webservice on the localhost with the name HelloWorld.
> And the url to acccess this services is like this.
> http://localhost/WSTest/HelloWorld.asmx
>
> and it contains only one method mHelloWorld().. which returns "Hello

World"
> string.
>
> Step 2:
>
> Created a client application (Smart device application) that consumes the
> above created service.
>
> Using the Add Webreference from the Project toolbar.. added the service

to
> the client and created the necessary code to access it.
>
> Step 3:
>
> After successfull compilation and deployment in both emulator as well as

in
> Pocket Pc Device.. i got the following error.
>
> An unhandled exception of type 'System.Net.WebException' occurred in
> System.Web.Services.dll
>
> Additional information: Unable to connect to the remote server
>
> The configurations of the dev. env. as follows:
>
> VS .NET 2003 Ent
>
> Emulator: Pocket PC 2002
>
> Device: iPAQ 3700 - Pocket PC v 3.0.11171..
>
> Thanks.. in advance....
>
> Regards,
>
> Krishna. Akula
>
>
>
>



 
Reply With Quote
 
Krishna
Guest
Posts: n/a
 
      1st Oct 2003
Hi Peter,
Thanks for the reply and
I tried that too.
Changed to Machine Name as well as IP address. but no use.. :-(

Please let me know if there is any solution for this..

Regards,
Krishna Akula.

"Peter Foot [MVP]" <(E-Mail Removed)> wrote in message
news:%23VN043$(E-Mail Removed)...
> This is because whether your device is a separate physical device or a
> "virtual" device in the case of the emulator it is not the same machine as
> the desktop pc. localhost is used to reference the machine on which the
> request is initiated - you need to replace this with the IP address or
> machine name of the PC on which the webservice is hosted.
>
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> www.inthehand.com | www.opennetcf.org
>
> "Krishna" <(E-Mail Removed)> wrote in message
> news:Oe9SIQ%(E-Mail Removed)...
> > Hi All,
> >
> > Here follows the scinario of my problem :
> >
> > Step 1:
> > Created a sample webservice on the localhost with the name HelloWorld.
> > And the url to acccess this services is like this.
> > http://localhost/WSTest/HelloWorld.asmx
> >
> > and it contains only one method mHelloWorld().. which returns "Hello

> World"
> > string.
> >
> > Step 2:
> >
> > Created a client application (Smart device application) that consumes

the
> > above created service.
> >
> > Using the Add Webreference from the Project toolbar.. added the service

> to
> > the client and created the necessary code to access it.
> >
> > Step 3:
> >
> > After successfull compilation and deployment in both emulator as well as

> in
> > Pocket Pc Device.. i got the following error.
> >
> > An unhandled exception of type 'System.Net.WebException' occurred in
> > System.Web.Services.dll
> >
> > Additional information: Unable to connect to the remote server
> >
> > The configurations of the dev. env. as follows:
> >
> > VS .NET 2003 Ent
> >
> > Emulator: Pocket PC 2002
> >
> > Device: iPAQ 3700 - Pocket PC v 3.0.11171..
> >
> > Thanks.. in advance....
> >
> > Regards,
> >
> > Krishna. Akula
> >
> >
> >
> >

>
>



 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      1st Oct 2003
This is asked a lot, so a search would have been a good first step.

"localhost" does *NOT* equate to "you dev PC". It means "The machine on
which I'm running". That means that to the Pocket PC, "localhost" is the
pocket pc itself, so it's trying to find the web service on it's own web
server, which is doesn't have, so it fails. NEVER, NEVER, EVER use
localhost. Use the machine name or IP.

-Chris


"Krishna" <(E-Mail Removed)> wrote in message
news:Oe9SIQ%(E-Mail Removed)...
> Hi All,
>
> Here follows the scinario of my problem :
>
> Step 1:
> Created a sample webservice on the localhost with the name HelloWorld.
> And the url to acccess this services is like this.
> http://localhost/WSTest/HelloWorld.asmx
>
> and it contains only one method mHelloWorld().. which returns "Hello

World"
> string.
>
> Step 2:
>
> Created a client application (Smart device application) that consumes the
> above created service.
>
> Using the Add Webreference from the Project toolbar.. added the service

to
> the client and created the necessary code to access it.
>
> Step 3:
>
> After successfull compilation and deployment in both emulator as well as

in
> Pocket Pc Device.. i got the following error.
>
> An unhandled exception of type 'System.Net.WebException' occurred in
> System.Web.Services.dll
>
> Additional information: Unable to connect to the remote server
>
> The configurations of the dev. env. as follows:
>
> VS .NET 2003 Ent
>
> Emulator: Pocket PC 2002
>
> Device: iPAQ 3700 - Pocket PC v 3.0.11171..
>
> Thanks.. in advance....
>
> Regards,
>
> Krishna. Akula
>
>
>
>



 
Reply With Quote
 
Krishna
Guest
Posts: n/a
 
      3rd Oct 2003
Thanks Chris,

I made the necessary changes ... putting.. IP address and all..
The webservice working fine in emulator.. and the problem still getting from
the device(iPAQ) with the following error..

"Unable to read data from the transport connection"

how can i resolve it ??

awaiting.. for the solution...

Regards,
Krishna.Akula

"Chris Tacke, eMVP" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> This is asked a lot, so a search would have been a good first step.
>
> "localhost" does *NOT* equate to "you dev PC". It means "The machine on
> which I'm running". That means that to the Pocket PC, "localhost" is the
> pocket pc itself, so it's trying to find the web service on it's own web
> server, which is doesn't have, so it fails. NEVER, NEVER, EVER use
> localhost. Use the machine name or IP.
>
> -Chris
>
>
> "Krishna" <(E-Mail Removed)> wrote in message
> news:Oe9SIQ%(E-Mail Removed)...
> > Hi All,
> >
> > Here follows the scinario of my problem :
> >
> > Step 1:
> > Created a sample webservice on the localhost with the name HelloWorld.
> > And the url to acccess this services is like this.
> > http://localhost/WSTest/HelloWorld.asmx
> >
> > and it contains only one method mHelloWorld().. which returns "Hello

> World"
> > string.
> >
> > Step 2:
> >
> > Created a client application (Smart device application) that consumes

the
> > above created service.
> >
> > Using the Add Webreference from the Project toolbar.. added the service

> to
> > the client and created the necessary code to access it.
> >
> > Step 3:
> >
> > After successfull compilation and deployment in both emulator as well as

> in
> > Pocket Pc Device.. i got the following error.
> >
> > An unhandled exception of type 'System.Net.WebException' occurred in
> > System.Web.Services.dll
> >
> > Additional information: Unable to connect to the remote server
> >
> > The configurations of the dev. env. as follows:
> >
> > VS .NET 2003 Ent
> >
> > Emulator: Pocket PC 2002
> >
> > Device: iPAQ 3700 - Pocket PC v 3.0.11171..
> >
> > Thanks.. in advance....
> >
> > Regards,
> >
> > Krishna. Akula
> >
> >
> >
> >

>
>



 
Reply With Quote
 
Zippy
Guest
Posts: n/a
 
      3rd Oct 2003
is your development pc on a network or not?
my emulator will not "connect" to my pc when disconnected from out
network, but works when connected. I assume this is to do with DNS
resolution.

Andy


"Krishna" <(E-Mail Removed)> wrote in message news:<eU#Tq#(E-Mail Removed)>...
> Thanks Chris,
>
> I made the necessary changes ... putting.. IP address and all..
> The webservice working fine in emulator.. and the problem still getting from
> the device(iPAQ) with the following error..
>
> "Unable to read data from the transport connection"
>
> how can i resolve it ??
>
> awaiting.. for the solution...
>
> Regards,
> Krishna.Akula
>
> "Chris Tacke, eMVP" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > This is asked a lot, so a search would have been a good first step.
> >
> > "localhost" does *NOT* equate to "you dev PC". It means "The machine on
> > which I'm running". That means that to the Pocket PC, "localhost" is the
> > pocket pc itself, so it's trying to find the web service on it's own web
> > server, which is doesn't have, so it fails. NEVER, NEVER, EVER use
> > localhost. Use the machine name or IP.
> >
> > -Chris
> >
> >
> > "Krishna" <(E-Mail Removed)> wrote in message
> > news:Oe9SIQ%(E-Mail Removed)...
> > > Hi All,
> > >
> > > Here follows the scinario of my problem :
> > >
> > > Step 1:
> > > Created a sample webservice on the localhost with the name HelloWorld.
> > > And the url to acccess this services is like this.
> > > http://localhost/WSTest/HelloWorld.asmx
> > >
> > > and it contains only one method mHelloWorld().. which returns "Hello

> World"
> > > string.
> > >
> > > Step 2:
> > >
> > > Created a client application (Smart device application) that consumes

> the
> > > above created service.
> > >
> > > Using the Add Webreference from the Project toolbar.. added the service

> to
> > > the client and created the necessary code to access it.
> > >
> > > Step 3:
> > >
> > > After successfull compilation and deployment in both emulator as well as

> in
> > > Pocket Pc Device.. i got the following error.
> > >
> > > An unhandled exception of type 'System.Net.WebException' occurred in
> > > System.Web.Services.dll
> > >
> > > Additional information: Unable to connect to the remote server
> > >
> > > The configurations of the dev. env. as follows:
> > >
> > > VS .NET 2003 Ent
> > >
> > > Emulator: Pocket PC 2002
> > >
> > > Device: iPAQ 3700 - Pocket PC v 3.0.11171..
> > >
> > > Thanks.. in advance....
> > >
> > > Regards,
> > >
> > > Krishna. Akula
> > >
> > >
> > >
> > >

> >
> >

 
Reply With Quote
 
Kevin Daly
Guest
Posts: n/a
 
      4th Oct 2003
Your problem is probably in the first instance that you need to install the
loopback adapter so your PC can pretend to the emulator that it's on a
network.
There are instructions on how to do this here:
http://msdn.microsoft.com/library/de...ackAdapter.asp
(For both Windows XP and Windows 2000).

Then you can type "ipconfig" in a command window, and use the value
displayed for "Ethernet adapter Local Area Connection" for your PC's IP
address.
Should work like a charm.
From there, to make life easier, I recommend Pocket Hosts by Marc Zimmermann
(http://www.zimac.de/cestuff.htm - Have a look. It just works).

On the other hand (and changing the subject completely without
justification, but it's been a frustrating week), getting an ad-hoc (as
opposed to infrastructure) WiFi link to work from a Pocket PC with a
DCF-660W card, *that's* the hard one (hint: I gave up).

"Zippy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> is your development pc on a network or not?
> my emulator will not "connect" to my pc when disconnected from out
> network, but works when connected. I assume this is to do with DNS
> resolution.
>
> Andy
>
>
> "Krishna" <(E-Mail Removed)> wrote in message

news:<eU#Tq#(E-Mail Removed)>...
> > Thanks Chris,
> >
> > I made the necessary changes ... putting.. IP address and all..
> > The webservice working fine in emulator.. and the problem still getting

from
> > the device(iPAQ) with the following error..
> >
> > "Unable to read data from the transport connection"
> >
> > how can i resolve it ??
> >
> > awaiting.. for the solution...
> >
> > Regards,
> > Krishna.Akula
> >
> > "Chris Tacke, eMVP" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > This is asked a lot, so a search would have been a good first step.
> > >
> > > "localhost" does *NOT* equate to "you dev PC". It means "The machine

on
> > > which I'm running". That means that to the Pocket PC, "localhost" is

the
> > > pocket pc itself, so it's trying to find the web service on it's own

web
> > > server, which is doesn't have, so it fails. NEVER, NEVER, EVER use
> > > localhost. Use the machine name or IP.
> > >
> > > -Chris
> > >
> > >
> > > "Krishna" <(E-Mail Removed)> wrote in message
> > > news:Oe9SIQ%(E-Mail Removed)...
> > > > Hi All,
> > > >
> > > > Here follows the scinario of my problem :
> > > >
> > > > Step 1:
> > > > Created a sample webservice on the localhost with the name

HelloWorld.
> > > > And the url to acccess this services is like this.
> > > > http://localhost/WSTest/HelloWorld.asmx
> > > >
> > > > and it contains only one method mHelloWorld().. which returns "Hello

> > World"
> > > > string.
> > > >
> > > > Step 2:
> > > >
> > > > Created a client application (Smart device application) that

consumes
> > the
> > > > above created service.
> > > >
> > > > Using the Add Webreference from the Project toolbar.. added the

service
> > to
> > > > the client and created the necessary code to access it.
> > > >
> > > > Step 3:
> > > >
> > > > After successfull compilation and deployment in both emulator as

well as
> > in
> > > > Pocket Pc Device.. i got the following error.
> > > >
> > > > An unhandled exception of type 'System.Net.WebException' occurred in
> > > > System.Web.Services.dll
> > > >
> > > > Additional information: Unable to connect to the remote server
> > > >
> > > > The configurations of the dev. env. as follows:
> > > >
> > > > VS .NET 2003 Ent
> > > >
> > > > Emulator: Pocket PC 2002
> > > >
> > > > Device: iPAQ 3700 - Pocket PC v 3.0.11171..
> > > >
> > > > Thanks.. in advance....
> > > >
> > > > Regards,
> > > >
> > > > Krishna. Akula
> > > >
> > > >
> > > >
> > > >
> > >
> > >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant start Webservice on localhost =?Utf-8?B?UE1X?= Windows XP General 0 15th Sep 2006 06:33 PM
i couldn't open my excel files,it gives location couldn't find err =?Utf-8?B?SG96ZWZh?= Microsoft Excel Misc 1 21st Dec 2005 04:06 PM
Couldn't open file C:\Documents ...error when editing localhost Kerry Microsoft Frontpage 4 19th Oct 2004 10:43 PM
"Couldn't open file C:\Documents ..." error while editing localhost copy Kerry Microsoft Frontpage 1 13th Oct 2004 08:52 AM
webservice alias for localhost Russell Todd via .NET 247 Microsoft Dot NET Compact Framework 1 15th Apr 2004 06:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:07 AM.