MSSupport: Compact Framework connection issue

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

"Unable to read data from the transport connection" error received when
trying to connect to a website through a firewall that requires a username,
password, and domain.

The code works from behind firewalls that don't require domains.

The customer can connect to the website in Pocket Internet Explorer. A
dialog comes up that asks for user, password, and domain. How can we get
this dialog to come up in our VB .NET application?

Windows Mobile 2003 SE operating system

Here is the code:
myRequest = System.Net.WebRequest.Create(RsURL)

myRequest.Timeout = 30000

myProxy = New System.Net.WebProxy

myUri = New Uri(Utils.GetOption(cmd, "ProxyServer"))

' Associate the new Uri object to the myProxy object.

myProxy.Address = myUri

sProxyUser = Utils.GetOption(cmd, "ProxyUser")

sProxyDomain = Utils.GetOption(cmd, "ProxyDomain")

myNetworkCred = New System.Net.NetworkCredential(sProxyUser,
Utils.GetOption(cmd, "ProxyPwd"), sProxyDomain)

myProxy.Credentials = myNetworkCred



myRequest.Credentials = myNetworkCred



myRequest.Proxy = myProxy
 
Hi Mike,

The dialog is popped up by IE, we can not make it show in the program.

Do you mean just the Firewall need authentication or both the website and
the firewall need authentication?
If both need, then the program works when both authentication without
domain or just one of them?

Also I think you may try to specified the username with format as below in
the NetworkCredential to see if that works
domainname\username


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Why can't a VB .NET app make the same dialog popup that IE has? Isn't VB
..NET one of the premier application development tools for Windows Mobile?
That's why I chose it. Can C# make it popup?

Just the firewall needs authentication.

Their firewall may use "Window Integrated Authentication" which I understand
v1 of the .NET Compact Framework doesn't support. Where can I get v2 Beta
of the .NET CF?
 
Why can't a VB .NET app make the same dialog popup that IE has? Isn't VB .NET one of the premier application development tools for Windows Mobile? That's why I chose it. Can C# make it popup?

Just the firewall needs authentication.

Their firewall may use "Window Integrated Authentication" which I understand v1 of the .NET Compact Framework doesn't support. Where can I get v2 Beta of the .NET CF?
 
Hi Mike,

I am sorry if I make any confusion.
I mean the dialog is popped up by IE and handled by IE, i.e. when the IE
get the 407 response, it will popup the dialog and then collect the
username and password to resend the request. But we can not popped up such
dialog in out windows application, the dialog I mean here is that the
dialog popped up and we input user/pass and then the system will pass the
credential automatically.

But in windows application we can do the same job, e.g. we can run in the
try ...catch , when the security exception occur, we can pop up a dialog
and collect the usr/pass and then pass it to the request( here we need to
handle the credential transportation ourselves), so here we do not need to
popup such dialog, what we need to do is how to send the correct
credentials.

For compact formwork 2.0 issue, here is some information.

In addition, Microsoft highlighted great momentum around the .NET Compact
Framework. Version 2.0 is included in the beta release of Visual
Studio?2005, the next major version of Visual Studio being released at the
conference. Microsoft .NET Compact Framework 2.0 provides a richer
application development environment for mobile developers through
dramatically increased productivity, performance and extensibility. In
addition, the .NET Compact Framework partner roster continues to grow, and
Microsoft has received positive feedback from smart device application
builders and customers that have benefited from the combination of the
familiar Visual Studio development environment and the .NET Compact
Framework. One customer that has experienced cost reductions and increased
productivity benefits from this combination of tools is the global
logistics company TNT Express. The company recently used the .NET Compact
Framework to develop a field force remote management application, which was
deployed to more than 24,000 of its employees around the world. The use of
..NET Compact Framework enabled TNT Express's existing base of developers to
build the application with reduced costs and time to market.

http://www.microsoft.com/presspass/press/2004/jun04/06-29MobileDevTechEdWith
O2PR.asp

We may get the vs 2005 beta release here.

http://lab.msdn.microsoft.com/vs2005/

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Mike,

Yes, you are right. So there is a few hours' time difference. Anyway, if
you have any problem, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top