VS2008 and WM6 - Connect to device failed


C

Chris Botha

This works fine from the same desktop computer to a PPC 2003 device, no
problem.

Problem comes with a Samsung Omnia that runs WM 6.1.
When I hit <Cntrl>F5, so to run the app, VS brings up the Deploy window and
I select the device.
VS tries for about a minute to deploy, then gives this error - "Connect to
device failed", nothing else, just this.

I can build the app, manually copy it over to the device, run the app, and
it works, well, of course the device asks the 1st time if it should trust,
etc.

The desktop runs Vista Ultimate, VS2008, Windows Mobile Device Center 6.1
(no ActiveSync on Vista any more) and I installed the Windows Mobile 6 SDK
as well.

As mentioned, works fine with my PPC 2003 device, I can run, debug,
whatever.
 
Ad

Advertisements

P

Peter Foot

Try running the Device Security Manager (Tools menu in Visual Studio 2008).
You can check the current security policy on the device and possibly
provision a less strict policy or turn security off while you debug.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility
 
C

Chris Botha

Thanks Peter, I did try this. When clicking "Connect to device", it also
attempts to connect for about a minute as well, then gives an error
"Connection failed. No connection could be made because the target machine
actively refused it."
 
P

Paul G. Tobey [eMVP]

Actively refused indicates something useful. There is no one on the device
listening on the TCP port to which Visual Studio is trying to connect. This
might indicate a firewall in the way, on either end, PC or device, or it
might indicate that the device-side piece of code that's supposed to be
running is not (maybe you didn't copy all of the files associated with
CoreCon, for example), or the code is running but listening on the wrong
port. My first guess would be an outbound firewall blocking the outgoing
port on the PC...

Paul T.
 
C

Chris Botha

Nice, thanks. Actually I did not copy any files to the device at all, so
obviously none to be associated with CoreCon.
Where can I find this info? Maybe I should give this a shot first.

I can handle the firewall on the PC. Don't think it is this though, as
mentioned, everything works fine for a PPC 2003 device from the same PC.
Did not know the device has a firewall - if the CoreCon looks OK on the
device, I'll pursue this.

Thanks.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:#[email protected]
 
P

Paul G. Tobey [eMVP]

Yes, when you're connected with ActiveSync, Visual Studio is supposed to
handle copying the files automatically. That's what I'm wondering about,
whether that's failing, either because some of ActiveSync's ports are
blocked, or maybe because of a problem doing the copy (it tries to copy to
\windows, I think; if the device secures that folder...)

I don't know for sure that the device *does* have a firewall, but that's the
sort of thing that can happen. The most-likely cause is that CoreCon is not
being successfully started...

Paul T.

Chris Botha said:
Nice, thanks. Actually I did not copy any files to the device at all, so
obviously none to be associated with CoreCon.
Where can I find this info? Maybe I should give this a shot first.

I can handle the firewall on the PC. Don't think it is this though, as
mentioned, everything works fine for a PPC 2003 device from the same PC.
Did not know the device has a firewall - if the CoreCon looks OK on the
device, I'll pursue this.

Thanks.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:#[email protected]
Actively refused indicates something useful. There is no one on the
device listening on the TCP port to which Visual Studio is trying to
connect. This might indicate a firewall in the way, on either end, PC or
device, or it might indicate that the device-side piece of code that's
supposed to be running is not (maybe you didn't copy all of the files
associated with CoreCon, for example), or the code is running but
listening on the wrong port. My first guess would be an outbound
firewall blocking the outgoing port on the PC...

Paul T.
 
Ad

Advertisements

C

Chris Botha

Right, thanks. For all previous devices, VS did copy the files and
everything went smooth. Maybe VS did copy the files, I don't know - I can
use Windows Explorer (through Windows Mobile Device Center) to copy files in
and out, no problem.

I guess I should determine (1) if the right files are there, and if it still
does not work (2) how to lower the device's security settings to "none at
all" and restore it afterwards.

Thanks in any case.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:#[email protected]
Yes, when you're connected with ActiveSync, Visual Studio is supposed to
handle copying the files automatically. That's what I'm wondering about,
whether that's failing, either because some of ActiveSync's ports are
blocked, or maybe because of a problem doing the copy (it tries to copy to
\windows, I think; if the device secures that folder...)

I don't know for sure that the device *does* have a firewall, but that's
the sort of thing that can happen. The most-likely cause is that CoreCon
is not being successfully started...

Paul T.

Chris Botha said:
Nice, thanks. Actually I did not copy any files to the device at all, so
obviously none to be associated with CoreCon.
Where can I find this info? Maybe I should give this a shot first.

I can handle the firewall on the PC. Don't think it is this though, as
mentioned, everything works fine for a PPC 2003 device from the same PC.
Did not know the device has a firewall - if the CoreCon looks OK on the
device, I'll pursue this.

Thanks.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message news:#[email protected]
Actively refused indicates something useful. There is no one on the
device listening on the TCP port to which Visual Studio is trying to
connect. This might indicate a firewall in the way, on either end, PC
or device, or it might indicate that the device-side piece of code
that's supposed to be running is not (maybe you didn't copy all of the
files associated with CoreCon, for example), or the code is running but
listening on the wrong port. My first guess would be an outbound
firewall blocking the outgoing port on the PC...

Paul T.

Thanks Peter, I did try this. When clicking "Connect to device", it
also attempts to connect for about a minute as well, then gives an
error "Connection failed. No connection could be made because the
target machine actively refused it."


Try running the Device Security Manager (Tools menu in Visual Studio
2008). You can check the current security policy on the device and
possibly provision a less strict policy or turn security off while you
debug.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility

This works fine from the same desktop computer to a PPC 2003 device,
no problem.

Problem comes with a Samsung Omnia that runs WM 6.1.
When I hit <Cntrl>F5, so to run the app, VS brings up the Deploy
window and I select the device.
VS tries for about a minute to deploy, then gives this error -
"Connect to device failed", nothing else, just this.

I can build the app, manually copy it over to the device, run the
app, and it works, well, of course the device asks the 1st time if it
should trust, etc.

The desktop runs Vista Ultimate, VS2008, Windows Mobile Device
Center 6.1 (no ActiveSync on Vista any more) and I installed the
Windows Mobile 6 SDK as well.

As mentioned, works fine with my PPC 2003 device, I can run, debug,
whatever.
 

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