【发布时间】:2012-08-16 12:52:04
【问题描述】:
在代理之后,我的 .Net 4.0 C# 应用程序只有在 app.config 包含以下内容时才能工作:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy />
<bypasslist />
<module />
</defaultProxy>
</system.net>
现在,由于我不想拥有 app.config 并且不建议嵌入 app.config,因此与 app.config 中的 xml 块具有相同效果的 C# 代码是什么以及我应该放置在哪里是吗?
【问题讨论】:
-
我非常需要解决这个问题的方法!!多年来,我一直在许多环境中遇到这个问题......
标签: c# .net app-config