Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to deploy or debugging... Some clues!

2 views
Skip to first unread message

Jan Yeh

unread,
Sep 15, 2003, 3:35:17 AM9/15/03
to
Hello,

I believe that many people are suffering from "Unable to establish a
connection" &
"Unable to start debugging" situations. There are couples of solutions in
the newsgroup,
some works for some situation, and some doesn't.

Mine is NB with WinXP Prof. and HP Jornada 568, connected by cradle & CF
NIC...
Debugging never works on my NB,
but it goes well on my PC(Win2K, the same device)...

I searched many threads, and tried many ways trying to solve this problem.
Including the recently "Windows CE Utilities for .NET Compact Framework",
SDAuthxxx.exe.

Yesterday, I saw a thread talking about this.
And I try to log in with another account which has administrator authority,
and it works fine.
Then I turn back to log in with the original one, still fail.

That's really a great finding.
I believe that there must be some settings were wrong in the registry or
personal profiles.
Re-install the whole machine would be a extreme solution, but re-install
VS.NET 2003 is
already a torture :(
However, that need someone more perseverant to keep finding, or wait for
MSFT to release
some patches or explainations.

Following is some milestones articles in the locus of my searching...

Loopback adapter
There are tons of this solution, so I skip this link...

Un-install and Re-install VS.NET
I even delete reside keys in registry HKLM(HKCU as
well)\Software\Microsoft\VisualStuio...

ProxyPorts Registry
http://groups.google.com.tw/groups?hl=zh-TW&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=33076538f84b5347&seekm=tNJMW4m7CHA.2260%40cpmsftngxa08.phx.gbl#link5

Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack
http://groups.google.com.tw/groups?hl=zh-TW&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=33076538f84b5347&seekm=9ZKFx6y8CHA.1640%40cpmsftngxa06#link14

WinCEConfig tool solution
http://groups.google.com.tw/groups?hl=zh-TW&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=dd220c169ee838b0&seekm=%236Zksy0tCHA.2496%40TK2MSFTNGP10#link2

Login with another account
http://groups.google.com.tw/groups?hl=zh-TW&lr=&ie=UTF-8&oe=UTF-8&frame=right&th=dd220c169ee838b0&seekm=eKNA9IlxCHA.1620%40TK2MSFTNGP11#link13

If you have any other resource or findings, it's welcome to follow the post.
BTW, I wish most is to know the mechanism how debugging over TCP connection
works.

PS: Sorry for post again, I just want it to be a new thread.

Best Regards,
Jan Yeh

Jason Polliard

unread,
Sep 15, 2003, 4:08:59 PM9/15/03
to
Jan,

I've also had to deal with this. There is a
troubleshooter at
http://support.microsoft.com/default.aspx?
scid=/support/pocketpc/tshoot/activesync/default.asp that
helped me out. Hope it helps.

Jason

>.
>

- robins @ntlworlddotcom Martin Robins

unread,
Sep 15, 2003, 5:37:47 PM9/15/03
to
I have just posted a possible solution to the previous thread. Please check
it out and let me know if it helps.


"Jan Yeh" <jan...@NOSPAMmail2000.com.tw> wrote in message
news:unQ6qv1e...@TK2MSFTNGP11.phx.gbl...

Ximing Zhou [MS]

unread,
Sep 15, 2003, 8:12:14 PM9/15/03
to
Hi Jan,

I've attached a zipped tool DelDesktopCryptKey.exe. Please run it on your
VS.NET 2003 machine in a cmd window. Let us know whether it fixes your
connection problem.

Ximing Zhou[MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Jan Yeh" <jan...@NOSPAMmail2000.com.tw>
| Subject: Unable to deploy or debugging... Some clues!
| Date: Mon, 15 Sep 2003 15:35:17 +0800
| Lines: 64
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <unQ6qv1e...@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: adsl-sta-tpe-62-23-130.so-net.net.tw 61.62.23.130
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:33342
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

DelDesktopCryptKey.zip

Joergen Bech <jbechpost1.tele.dk>

unread,
Sep 16, 2003, 4:25:49 AM9/16/03
to

*Sniff*

Finally, after all this time, something that actually works.

Thanks!

Regards,

Joergen Bech

Jan Yeh

unread,
Sep 16, 2003, 8:57:13 AM9/16/03
to
Thanks for all the following post ...

I will try these solutions to see which is my FINAL solution. :)

However, I am really curious about the mechanism how this happen...
Hope someone can give me a good explaination or where can I find
the document saying the mechnism under the remote debugging.

Thanks in advance!!

Best Regard,
Jan Yeh

""Ximing Zhou [MS]"" <xim...@microsoft.com> 在郵件
news:Igwrwc%23eDH...@cpmsftngxa07.phx.gbl 中撰寫...

Martin Robins

unread,
Sep 16, 2003, 10:55:12 AM9/16/03
to
Superb. VS2003 now connects to my PPC devices again on my laptop.

Perhaps Ximing, you could arrange for the KB article (813579) to be updated
to include a reference to this file as I have also today followed the
instructions therein and it failed to resolve the problem.

Cheers.


""Ximing Zhou [MS]"" <xim...@microsoft.com> wrote in message
news:Igwrwc%23eDH...@cpmsftngxa07.phx.gbl...

Ximing Zhou [MS]

unread,
Sep 16, 2003, 7:23:27 PM9/16/03
to
Microsoft is soon releasing an update to the Window CE Utilities for Visual
Studio .NET 2003 Add-on Pack. The update should include this tool.

Ximing


This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

| From: "Martin Robins" <martin...@ntlworld.com>
| References: <unQ6qv1e...@TK2MSFTNGP11.phx.gbl>
<Igwrwc#eDHA...@cpmsftngxa07.phx.gbl>
| Subject: Re: Unable to deploy or debugging... Some clues!
| Date: Tue, 16 Sep 2003 15:55:12 +0100
| Lines: 126


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

| Message-ID: <#70LSJGf...@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: gate1.anc.co.uk 217.158.138.34
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.
phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:33491
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Ximing Zhou [MS]

unread,
Sep 17, 2003, 7:31:12 PM9/17/03
to
Good to know the tool fixed the problem. It only contains one API call, a
call to CryptAcquireContext. The API may use some security related dlls.

Ximing

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Jan Yeh" <jan...@NOSPAMmail2000.com.tw>

| References: <unQ6qv1e...@TK2MSFTNGP11.phx.gbl>
<Igwrwc#eDHA...@cpmsftngxa07.phx.gbl>
| Subject: Re: Unable to deploy or debugging... Some clues!
| Date: Wed, 17 Sep 2003 11:29:10 +0800
| Lines: 177


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

| Message-ID: <e$5zfvMfD...@TK2MSFTNGP09.phx.gbl>


| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: adsl-sta-tpe-62-23-130.so-net.net.tw 61.62.23.130

| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:33713
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| DelDesktopCryptKey.exe has solved my problem!!
|
| I attached the log during the DelDesktopCryptKey.exe runs.
| I found it touched many files relate to security or encryption.


|
| Jan Yeh
|
| ""Ximing Zhou [MS]"" <xim...@microsoft.com> 在郵件
| news:Igwrwc%23eDH...@cpmsftngxa07.phx.gbl 中撰寫...

Jan Yeh

unread,
Sep 19, 2003, 6:31:17 AM9/19/03
to
Thanks again!

Could you tell me what does this API call do?
It seems that it clears some crypto or security information in the user
profile,
I guess the original setting may block the connection establishment.

Best Regards,
Jan Yeh

""Ximing Zhou [MS]"" <xim...@microsoft.com> 在郵件

news:N9CuKPXf...@cpmsftngxa06.phx.gbl 中撰寫...

Paul G. Tobey [eMVP]

unread,
Sep 19, 2003, 11:28:10 AM9/19/03
to
You can look it up in the Pocket PC SDK for eVC++. Here's the text...

Paul T.

-----


Microsoft Windows CE .NET 4.2

CryptAcquireContextSee Also
Cryptography | CryptGenKey | CryptGetProvParam | CryptReleaseContext

Requirements
OS Versions: Windows CE 2.10 and later.
Header: Wincrypt.h.
Link Library: Coredll.lib.
This function acquires a handle to a specific key container within a
particular cryptographic service provider (CSP). This handle can be used to
make calls to the selected CSP.

BOOLEAN CRYPTFUNC CryptAcquireContext(
HCRYPTPROV* phProv,
LPCTSTR pszContainer,
LPCTSTR pszProvider,
DWORD dwProvType,
DWORD dwFlags
);
Parameters
phProv
[out] Pointer to a handle to a CSP.
pszContainer
[in] Pointer to a null-terminated string that identifies the key container
to the CSP. This name is independent of the method used to store the keys.
Some CSPs store their key containers internally in the hardware, some use
the system registry, and others use the file system.
When dwFlags is set to CRYPT_VERIFYCONTEXT, pszContainer must be set to
NULL. If this parameter is NULL, a default key container name is used.

Application developers should be carefull when using the default key
container. When multiple applications use the same container, one
application can change or destroy the keys that another application needs.

An application can obtain the name of the acquired key container at a later
time by reading the PP_CONTAINER CSP parameter with the CryptGetProvParam
function.

pszProvider
[in] Pointer to a null-terminated string that specifies the name of the CSP
to be used.
If this parameter is NULL, the user default provider is used. For more
information about connecting to CSPs, see the programmer's guide topics
under Cryptography.

An application can obtain the name of the acquired CSP at a later time by
reading the PP_NAME CSP parameter with the CryptGetProvParam function.

dwProvType
[in] Specifies the type of provider to acquire. The following provider types
are predefined:
PROV_RSA_FULL
PROV_RSA_SIG
PROV_DSS
PROV_DSS_DH
PROV_FORTEZZA
PROV_MS_EXCHANGE
PROV_RSA_SCHANNEL
PROV_SSL
PROV_EC_ECDSA_SIG
PROV_EC_ECNRA_SIG
PROV_EC_ECDSA_FULL
PROV_EC_ECNRA_FULL
PROV_SPYRUS_LYNKS
PROV_RNG
PROV_INTEL_SEC
dwFlags
[in] Bitmask of flags. This parameter is usually set to zero. The following
table shows flags that can be set. Flag Description
CRYPT_VERIFYCONTEXT If this flag is set, the application has no access to
the private keys and the pszContainer parameter must be set to NULL.
This option is intended for applications that do not use private keys.

When CryptAcquireContext is called, many CSPs require input from the owning
user before granting access to the private keys in the key container. For
example, the private keys may be encrypted, requiring a password from the
user before they can be used. However, if the CRYPT_VERIFYCONTEXT flag is
specified, access to the private keys is not required and the user interface
can be bypassed.

CRYPT_NEWKEYSET If this flag is set, a new key container is created with the
name specified by pszContainer. If pszContainer is NULL, a key container
with the default name is created. See CRYPT_MACHINE_KEYSET for information
on combining flags.
CRYPT_MACHINE_KEYSET By default, keys are stored for the current user. The
CRYPT_MACHINE_KEYSET flag can be set and combined with all of the other
flags to indicate that the keys are persisted for the computer and not for
any particular user. Combined with the CRYPT_NEWKEYSET flag, the
CRYPT_MACHINE_KEYSET flag can access keys for a service.
CRYPT_DELETEKEYSET If this flag is set, then the key container specified by
pszContainer is deleted. If pszContainer is NULL, then the key container
with the default name is deleted. All key pairs in the key container are
also destroyed.
When the CRYPT_DELETEKEYSET flag is set, the value returned in phProv is
undefined; therefore, a call to the CryptReleaseContext function is not
required.

CRYPT_SILENT The application requests that the CSP not display any user
interface (UI) for this context. If the CSP must display the UI to operate,
the call fails with the NTE_SILENT_CONTEXT error. In addition, if a call is
made to CryptGenKey with the CRYPT_USER_PROTECTED flag and a context
acquired with the CRYPT_SILENT flag, the call fails and the CSP sets
NTE_SILENT_CONTEXT.
CRYPT_SILENT is intended for CSP applications that cannot display a UI.


Return Values
TRUE indicates success. FALSE indicates failure. To get extended error
information, call the GetLastError function.

The following table shows common values for the GetLastError function. The
error values prefaced by NTE are generated by the particular CSP you are
using.

Value Description
ERROR_BUSY Some CSPs set this error if the CRYPT_DELETEKEYSET flag value is
set and another thread or process is using this key container.
ERROR_INVALID_PARAMETER One of the parameters contains an invalid value.
This is most often an illegal pointer.
ERROR_NOT_ENOUGH_MEMORY The operating system ran out of memory during the
operation.
NTE_BAD_FLAGS The dwFlags parameter contains an invalid value.
NTE_BAD_KEYSET The key container could not be opened. A common cause of this
error is that the key container does not exist. To create a key container,
call CryptAcquireContext using the CRYPT_NEWKEYSET flag. This error code can
also indicate that the access to an existing key container is denied.
NTE_BAD_KEYSET_PARAM The pszContainer or pszProvider parameter is set to an
invalid value.
NTE_BAD_PROV_TYPE The value of the dwProvType parameter is out of range. All
provider types must be from 1 to 999, inclusive.
NTE_BAD_SIGNATURE The provider DLL signature could not be verified. Either
the DLL or the digital signature has been tampered with.
NTE_EXISTS The dwFlags parameter is CRYPT_NEWKEYSET, but the key container
already exists.
NTE_FAIL The function failed in some unexpected way.
NTE_KEYSET_ENTRY_BAD The pszContainer key container was found but is
corrupt.
NTE_KEYSET_NOT_DEF The key container specified by pszContainer does not
exist.
NTE_NO_MEMORY The CSP ran out of memory during the operation.
NTE_PROV_DLL_NOT_FOUND The provider DLL file does not exist or is not on the
current path.
NTE_PROV_TYPE_ENTRY_BAD The provider type specified by dwProvType is
corrupt. This error may relate to either the user default CSP list or the
machine default CSP list.
NTE_PROV_TYPE_NO_MATCH The provider type specified by dwProvType does not
match the provider type found. Note that this error can only occur when
pszProvider specifies an actual CSP name.
NTE_PROV_TYPE_NOT_DEF No entry exists for the provider type specified by
dwProvType.
NTE_PROVIDER_DLL_FAIL The provider DLL file could not be loaded, and may not
exist. If it exists, then the file is not a valid DLL.
NTE_SIGNATURE_FILE_BAD An error occurred while loading the DLL file image,
prior to verifying its signature.

Example Code
The following example shows a call to acquire a cryptographic context and to
access public and private key pairs in a key container. If the requested key
container does not exist, it is created.

//--------------------------------------------------------------------
// Declare and initialize variables.

HCRYPTPROV hCryptProv = NULL; // Handle for a cryptographic
// provider context.
LPCSTR UserName = "MyKeyContainer"; // Name of the key container
// to be used.
//--------------------------------------------------------------------
// Attempt to acquire a context and a key
// container. The context will use the default CSP
// for the RSA_FULL provider type. DwFlags is set to 0
// to attempt to open an existing key container.

if(CryptAcquireContext(
&hCryptProv, // Handle to the CSP.
UserName, // Container name.
NULL, // Use the default provider.
PROV_RSA_FULL, // Provider type.
0)) // Flag values.
{
printf("A crypto context with the %s key container \n", UserName);
printf("has been acquired.\n\n");
}
else
{
//--------------------------------------------------------------------
// An error occurred in acquiring the context. This could mean
// that the key container requested does not exist. In this case,
// the function can be called again to attempt to create a new key
// container. Error codes are defined in winerror.h.
if (GetLastError() == NTE_BAD_KEYSET)
{
if(CryptAcquireContext(
&hCryptProv,
UserName,
NULL,
PROV_RSA_FULL,
CRYPT_NEWKEYSET))
{
printf("A new key container has been created.\n");
}
else
{
printf("Could not create a new key container.\n");
exit(1);
}
else
{
printf("A cryptographic service handle could not be acquired.\n");
exit(1);
}

} // End of else.
//--------------------------------------------------------------------
// A cryptographic context and a key container are available. Perform
// any functions that require a Cryptographic provider handle.

//--------------------------------------------------------------------
// When the handle is no longer needed, it must be released.

if (CryptReleaseContext(hCryptProv,0))
{
printf("The handle has been released.\n");
}
else
{
printf("The handle could not be released.\n");
}
Remarks
CryptAcquireContext performs two operations. First, it attempts to find a
CSP with the characteristics described in the dwProvType and pszProvider
parameters. Then, if the CSP is found, the function attempts to find a key
container within the CSP matching the name specified by the pszContainer
parameter. To acquire the context and the key container or a private key
associated with the public key of a certificate, use the
CryptAcquireCertificatePrivateKey function.

With the appropriate dwFlags setting, this function can also create and
destroy key containers and can provide access to a CSP with a temporary key
container if access to a private key is not required.

Windows CE does not support the ANSI version of this function.

When key containers are created, most CSPs do not automatically create any
public/private key pairs. These keys must be created as a separate step with
the CryptGenKey function.

Requirements
OS Versions: Windows CE 2.10 and later.
Header: Wincrypt.h.
Link Library: Coredll.lib.

See Also
Cryptography | CryptGenKey | CryptGetProvParam | CryptReleaseContext


----------------------------------------------------------------------------
----

Last updated on Tuesday, March 11, 2003

Send Feedback on this topic About Sending Feedback


-----

"Jan Yeh" <jan...@NOSPAMmail2000.com.tw> wrote in message

news:uBMarkpf...@tk2msftngp13.phx.gbl...

ET

unread,
Sep 25, 2003, 6:01:20 PM9/25/03
to
Well It failed for me

here is the error message: CryptAcquireContext DELETEKEYSET error 0x80090016


""Ximing Zhou [MS]"" <xim...@microsoft.com> wrote in message
news:Igwrwc%23eDH...@cpmsftngxa07.phx.gbl...

ET

unread,
Sep 26, 2003, 2:56:45 PM9/26/03
to
Rectification, after pluging my PPC in the cradle. I ran it again and
it finished successfully. I trying debugging and it worked fine. I
think this is the fixer. Good job Ximing!

Thanks.

ET

"ET" <E...@Tegaaa.com> wrote in message news:<ujanjC7g...@TK2MSFTNGP12.phx.gbl>...

Ximing Zhou [MSFT]

unread,
Sep 26, 2003, 3:10:50 PM9/26/03
to
That error is fine. It means the Crypto container is already clean. Are you
still getting the connection failure in VS.NET 2003?

Ximing


This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

| From: "ET" <E...@Tegaaa.com>
| References: <unQ6qv1e...@TK2MSFTNGP11.phx.gbl>
<Igwrwc#eDHA...@cpmsftngxa07.phx.gbl>
| Subject: Re: Unable to deploy or debugging... Some clues!
| Date: Thu, 25 Sep 2003 18:01:20 -0400
| Lines: 122


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

| Message-ID: <ujanjC7g...@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: modemcable050.151-200-24.mtl.mc.videotron.ca
24.200.151.50
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:34464
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

John Binhammer

unread,
Oct 1, 2003, 10:48:03 AM10/1/03
to
THANK YOU!

""Ximing Zhou [MS]"" <xim...@microsoft.com> wrote in message
news:Igwrwc%23eDH...@cpmsftngxa07.phx.gbl...

0 new messages