Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2004

Tip: Looking for answers? Try searching our database.

MSSupport: Compact Framework connection issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 03 Aug 2004 20:25 GMT
"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
"Peter Huang" - 04 Aug 2004 02:48 GMT
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

Signature

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

Mike - 04 Aug 2004 14:23 GMT
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,
>
[quoted text clipped - 13 lines]
> Peter Huang
> Microsoft Online Partner Support
"Peter Huang" - 05 Aug 2004 04:10 GMT
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

Signature

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

Mike - 05 Aug 2004 15:31 GMT
Thanks Peter.  Are you located in China?  I notice that your posts are
always at night by U.S. time.
"Peter Huang" - 06 Aug 2004 02:35 GMT
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

Signature

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

Mike - 04 Aug 2004 14:25 GMT
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,
>
[quoted text clipped - 16 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.