Connecting to Pocket PC thru VS .NET 2003

     问题描述:用vs.net 2003连接pocket pc 设备时,碰到一个问题。提示错误信息:无法建立连接。请确保此设备已经与开发计算机间里物理连接。然而,此时windows用acitivesync却可以很好连接ppc设备,并且进行各种信息同步。此外该手持在与一台dell(windows xp + sp2)的台式机上连接时没有遇到该问题,.net可以连接并发布程序到ppc上。这个问题令我百思不得其解。

     台式设备:window 2k server(sp4) + vs.net 2003 + microsoft ativesync

     手持设备:dopod 696(window mobile 2003 se)

我先是怀疑是操作系统的原因,于是找了一台window xp + sp2的系统,结果这台机器遇到了同样的问题。

经过一番折腾之后还没有解决问题。然后在网上寻找解决方案,搜索后发现似乎很多高手都经历过这个问题,给出的方案大都是:

感觉很奇怪,我明明用ActiveSync是可以连上的。到msdn上搜了一下(http://support.microsoft.com/default.aspx?scid=kb;en-us;816826
原文如下:
Certain users on the desktop computer may notice that the deployment to a Pocket PC device that is connected with ActiveSync is not successful and you receive the following error message:
Could not establish a connection with the device. Please make sure the device is connected and working properly.
Other users on the same computer may be able to deploy and to debug by using the same device, may find that ActiveSync is working correctly, and may find that the file /Windows/ConManClient.exe is not copied to the device when they try to deploy or to debug. These symptoms indicate a possible corrupted security key container.

On the computer that is running Visual Studio .NET, run the DelDesktopCryptKey.exe utility from the command prompt to clean the security key container for the current user. DelDesktopCryptKey.exe is installed with the Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack. By default, DelDesktopCryptKey.exe is located in the Program Files/Microsoft Visual Studio .NET 2003/CompactFrameworkSDK/WinCE Utilities/DelDesktopCryptKey folder.

原来是由于security key container过期了,安装Windows CE Utilities for Visual Studio .NET 2003 Add-on package 后,在命令行中到Program Files/Microsoft Visual Studio .NET 2003/CompactFrameworkSDK/WinCE Utilities/DelDesktopCryptKey目录下运行DelDesktopCryptKey.exe,然后在重启一下计算机,问题解决。

我再三试验,还是解决不了问题。后来在网上搜到一篇贴子:http://www.opennetcf.org/Forums/post.asp?method=ReplyQuote&REPLY_ID=8261&TOPIC_ID=305&FORUM_ID=16上面有人给出这样的解决方案:

Hi People

Thanks to this folrum I've got solution !
I am using MS ActiveSync v 3.8.0, and device is PSION Teklogix (Win CE)

Definitely there are 3 steps that (finally) helped me to connect to the device

1. Installed those two .reg files placed at folder C:/Program Files/Microsoft Visual Studio .NET 2003/CompactFrameworkSDK/WinCE Utilities/WinCE Proxy Ports Reg(下载Windows CE .NET Utilities v1.1 for Visual Studio .NET 2003之后安装,在.net的安装目录下有相应的文件,中文版下载路径:http://www.microsoft.com/downloads/info.aspx?na=46&p=2&SrcDisplayLang=zh-cn&SrcCategoryId=&SrcFamilyId=7ec99ca6-2095-4086-b0cc-7c6c39b28762&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2ff%2f3%2f5f3c2f3c-1a06-4f1a-bd27-4ea5fb64ab1b%2fWindows+CE+.NET+Utilities+v1.1+for+Visual+Studio+.NET+2003.EXE

2. Run the file DelDesktopCryptKey.exe placed at folder C:/Program Files/Microsoft Visual Studio .NET 2003/CompactFrameworkSDK/WinCE Utilities/DelDesktopCryptKey

3. Detach and attach the device from the cradle (seems it's the most important step !)

Now, my MSNET 2003 connects to the device

PS. TCP Connect Transport setting uses the option "Obtain an IP address automatically using ActiveSync"

 

我立即按照这三步一一做来,果然可以顺利的连接到设备了。

一个周末的时间,总算解决了一个问题。本人不擅长写文章,也不晓得写的对不对,希望能大家提供一点帮助,各位多多批评指正!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值