Cant get CF APP to find my Webservice in 2005

G

Guest

I am trying to debug a webservice from a CF App. I can debug the app, but not
the Webservice. IE on the emulator cannot see my local webservice so I know
it is a config problem.

I was wondering if anybody else had this working with 2005?
If you do any pointers as to whta you have to configure would eb most
appreciated.
 
P

Peter Foot [MVP]

Have you put the hostname of the development PC as the target of the
webservice? - not localhost...

Peter
 
G

Guest

Sorry I should have stated what i have done.
I have tried with the host name and the ip address as both a reference in
the app and as direct input in internet explorer on the PPC. Niether work
although I can browse with Internet explorer on the PPC.
 
G

Guest

This is talking about getting it to work in VPC. I am currently just using
the emulator with 2005. What is the best setup? If the best setup is VPC
where do I get the iso from there is nothing under Operating Systems in MSDN?

I have checked the options under the emulator and all i can do is enable a
pcmci network card (which i have).

Sergey Bogdanov said:
Make sure that you are using IP address or name of the host computer
instead of "localhost". After that read the following article how to
cradle emulator to ActiveSync:
http://blogs.msdn.com/jeffabraham/archive/2005/05/10/416196.aspx

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

I am trying to debug a webservice from a CF App. I can debug the app, but not
the Webservice. IE on the emulator cannot see my local webservice so I know
it is a config problem.

I was wondering if anybody else had this working with 2005?
If you do any pointers as to whta you have to configure would eb most
appreciated.
 
S

Sergey Bogdanov

It also describers how to cradle emulator to active sync (this is
important part for you in this article). Once you cradle the emulator to
ActiveSync you can connect to you webservice.

Read this:

------------------------------
Now we need to start the emulator and cradle it with ActiveSync:

1) Start Tools\Device Emulator Manager

2) Right click on the device name and select "Connect" from the action
menu. Wait for the emulator to appear. If you had a local saved state
make sure it was not cradled prior to being saved - check for a
connection icon in the lower right corner. If the icon is present -
click on it and select "Disconnect" in the dialog that appears.

3) Right click on the device name (it should now be marked with a green
arrow) and select "Cradle" from the action menu. The green ActiveSync
wheel should start rotating. Wait for the "Partnership" dialog from
ActiveSync and select either guest or full partnership.

Start Internet Explorer inside the emulator and verify that your
connection works.
------------------------------

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

This is talking about getting it to work in VPC. I am currently just using
the emulator with 2005. What is the best setup? If the best setup is VPC
where do I get the iso from there is nothing under Operating Systems in MSDN?

I have checked the options under the emulator and all i can do is enable a
pcmci network card (which i have).

:

Make sure that you are using IP address or name of the host computer
instead of "localhost". After that read the following article how to
cradle emulator to ActiveSync:
http://blogs.msdn.com/jeffabraham/archive/2005/05/10/416196.aspx

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

I am trying to debug a webservice from a CF App. I can debug the app, but not
the Webservice. IE on the emulator cannot see my local webservice so I know
it is a config problem.

I was wondering if anybody else had this working with 2005?
If you do any pointers as to whta you have to configure would eb most
appreciated.
 
N

n33470

I've just been through the same process of getting a webservice-based
CF app setup for debugging. Be sure that you clear out the state in
the emulator, before you get started. I've found that I can can not
successfully connect to the network, through ActiveSync, after I've
saved state in the emulator.

Is there a way to automate the process of starting the device manager,
after you startup the VS debugger on the CF project? I posted another
thread in this newsgroup asking the same question. Is there a way to
automatically startup the device manager, connect to the emulator, and
cradle it? Currently when I debug our webservice-based CF app, it's a
pain to get started due to the manual steps involved in getting
everything started.

--steve
 
G

Guest

Thanks for the reply.

I got this to work first time. Then when I decided to start a fresh it would
not connect. I had to check the network on the PPC Emulator goto bbc.co.uk
then uncheck (all whilst connected to activesync) for it to then start seeing
the webservice.

That is step one complete. However, I still cannot debug the webservice
running 2005.
If I Start the PPC app I get debugging symbols not loaded. If I start the
webservice directly and access it from the PC I can get it to work with
Localhost:portnumber, machinename:portnumber or IPAddress. I cannot get it to
work with IPAddress:portnumber from the pc.
On the PPC I can ONLY access the webservice via the IPAddress.
I can see how VS2005 would not be able to debug this as I cannot get it to
debug when using the only URL I could get to work on the PPC.

Any Ideas?

Ps. I have tried starting the emulator from the Device Emulator Manager and
VS (on run) with no difference.

PPS. I am using a clean build of XP (sp2) and final VS2005.

Sergey Bogdanov said:
It also describers how to cradle emulator to active sync (this is
important part for you in this article). Once you cradle the emulator to
ActiveSync you can connect to you webservice.

Read this:

------------------------------
Now we need to start the emulator and cradle it with ActiveSync:

1) Start Tools\Device Emulator Manager

2) Right click on the device name and select "Connect" from the action
menu. Wait for the emulator to appear. If you had a local saved state
make sure it was not cradled prior to being saved - check for a
connection icon in the lower right corner. If the icon is present -
click on it and select "Disconnect" in the dialog that appears.

3) Right click on the device name (it should now be marked with a green
arrow) and select "Cradle" from the action menu. The green ActiveSync
wheel should start rotating. Wait for the "Partnership" dialog from
ActiveSync and select either guest or full partnership.

Start Internet Explorer inside the emulator and verify that your
connection works.
------------------------------

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com

This is talking about getting it to work in VPC. I am currently just using
the emulator with 2005. What is the best setup? If the best setup is VPC
where do I get the iso from there is nothing under Operating Systems in MSDN?

I have checked the options under the emulator and all i can do is enable a
pcmci network card (which i have).

:

Make sure that you are using IP address or name of the host computer
instead of "localhost". After that read the following article how to
cradle emulator to ActiveSync:
http://blogs.msdn.com/jeffabraham/archive/2005/05/10/416196.aspx

--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


Geoff wrote:

I am trying to debug a webservice from a CF App. I can debug the app, but not
the Webservice. IE on the emulator cannot see my local webservice so I know
it is a config problem.

I was wondering if anybody else had this working with 2005?
If you do any pointers as to whta you have to configure would eb most
appreciated.
 
G

Guest

Thanks for the reply.

I have been manually Cradle/Uncradle from the device emulator manager.

I am still having problems (state did not seem to make any difference). Can
you actually debug a PPC app (running on the emulator) and a webservice on
your local machine? I am having the problems below.

If I Start the PPC app I get debugging symbols not loaded. If I start the
webservice directly and access it from the PC I can get it to work with
Localhost:portnumber, machinename:portnumber or IPAddress. I cannot get it to
work with IPAddress:portnumber from the pc.
On the PPC I can ONLY access the webservice via the IPAddress.
I can see how VS2005 would not be able to debug this as I cannot get it to
debug when using the only URL I could get to work on the PPC.

Any Ideas?

Ps. I have tried starting the emulator from the Device Emulator Manager and
VS (on run) with no difference.

PPS. I am using a clean build of XP (sp2) and final VS2005.
 
N

n33470

Geoff,

Yes, I have a total debug environment on my local development PC for a
PPC app that calls local webservices. No problems.

I'm a little lost on where you are at exactly. Let me explain how I do
this, and maybe you can discover the missing link.

I have a single VS2005 solution that contains both the webservice
project and the PPC project. My webservice project is set to use IIS,
not the locally bundled webserver that comes package inside VS 2005,
not sure if that part matters, but it might.

The startup project in the solution is the PPC app. When I start the
debugger, the PPC emulator automatically opens and loads the app. Then
I manually start the Device Emulator Manager and connect/cradle (I hate
this step....I wish it was automated). ActiveSync has automatically
started by now and successfully connected to the device.

If I need to debug into the webservice, then I set a breakpoint in the
PPC app at the exact point that the webmethod is invoked. This is an
important step. Then I step "into" (F10) the webmethod which allows
you to debug the code and continue within the webservice. I have not
found a way to simply set a break point inside the webservice code and
have the debugger automatically catch there....I have to debug into the
webservice from the PPC code. This may be the missing link for you,
but I'm not sure.

HTH,

--steve
 
J

John Socha-Leialoha

n33470 said:
Geoff,

Yes, I have a total debug environment on my local development PC for a
PPC app that calls local webservices. No problems.

I'm a little lost on where you are at exactly. Let me explain how I do
this, and maybe you can discover the missing link.

I have a single VS2005 solution that contains both the webservice
project and the PPC project. My webservice project is set to use IIS,
not the locally bundled webserver that comes package inside VS 2005,
not sure if that part matters, but it might.

The startup project in the solution is the PPC app. When I start the
debugger, the PPC emulator automatically opens and loads the app. Then
I manually start the Device Emulator Manager and connect/cradle (I hate
this step....I wish it was automated). ActiveSync has automatically
started by now and successfully connected to the device.

If I need to debug into the webservice, then I set a breakpoint in the
PPC app at the exact point that the webmethod is invoked. This is an
important step. Then I step "into" (F10) the webmethod which allows
you to debug the code and continue within the webservice. I have not
found a way to simply set a break point inside the webservice code and
have the debugger automatically catch there....I have to debug into the
webservice from the PPC code. This may be the missing link for you,
but I'm not sure.

HTH,

--steve

I'm guessing here, but I think the reason you can't set breakpoints into
the web service directly is because you essentially have two
applications in a single solution using different platforms, so it
doesn't think you can set a breakpoint.

Here is an approach that I know works (because I've used it). Have two
different solutions: one for the web service and one for the CF
application. Then load these two solutions into two separate instances
of Visual Studio. Set breakpoints in the web application and run it,
which will open the web browser. Then run your pocket PC application.
Visual Studio will bounce back and forth between the two instances as it
encounters breakpoints either in IIS or the CF application.

As to cradling the emulator, I generally leave it cradled and just start
and quit the application I'm debugging on the emulator without
uncradling the emulator between test runs.

-- John
 
N

n33470

Geoff,

After working with this app again, I discovered that the single
solution approach *was not* debugging the way I thought it was. The
dual solution approach that John outlined (one for the web service
project, and another for the CF apps) works great, I just tried it.
In fact I like that approach better because it reinforces the design
that the web services are a separate entity.

John,

Thanks for the tip on using the emulator! I never realized that you
could start the emulator, connect it, cradle it, and then let it sit
there while you started/stopped the debugger in VS. What a time saver!


--steve
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top