VB:如何在桌面应用程序中使用Internet Explorer代理设置 [英] VB: How to use Internet Explorer proxy setting in the desktop application
本文介绍了VB:如何在桌面应用程序中使用Internet Explorer代理设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
主题:VB:如何在桌面应用程序中使用Internet Explorer代理设置?
亲爱的大家:
我的桌面应用程序在家中通过DSL来获取XML数据,但给出了
通过我的办公室LAN中的代理服务器进行Internet访问时出现异常.
请帮帮我.
Muhammad Islam
Subject: VB: How to use Internet Explorer proxy setting in the desktop application?
Dears all:
My desktop application fetches XML data via DSL at my home, but gives
exception on Internet access via proxy server in my office LAN.
Please help me.
Muhammad Islam
推荐答案
看看 ^ ]和默认凭据 a> [ ^ ]可供您使用的属性
可以通过编程方式针对您的"WebRequest"对象进行设置
例如.
Have a look at the Default Web Proxy[^] and Default Credentials[^] properties available to you
Either set these programatically against your ''WebRequest'' object
E.g.
request.Proxy = System.Net.WebProxy.GetDefaultProxy();
request.Proxy.Credentials = CredentialCache.DefaultCredentials;
..或您可以在应用程序配置文件中定义设置
..or you can define the settings in your application config file
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true" >
<proxy autoDetect="True" scriptLocation="http://wpad.premiers.qld.gov.au/wpad.dat"/>
</defaultProxy>
</system.net>
这篇关于VB:如何在桌面应用程序中使用Internet Explorer代理设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文