Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 C# 构建一个桌面邮件客户端 这个应用程序在我朋友的电脑上运行良好,但在我的电脑上不工作。它向我展示了一个例外列表。请帮助我。
System.Net.WebException:无法解析远程名称:'smtp.gmail.com'
例外列表在这里 http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/7781fb98-9c5e-4b3c-b699-e9ff92da75eb/
如果你使用代理,你应该像这样配置你的app.config文件:
<system.net> <defaultProxy> <proxy usessystemdefault="False" proxyaddress="http://your-proxy-name.domain.com:port-number-if-any" bypassonlocal="True" autoDetect="False" /> </defaultProxy> </system.net>