GetSystemWebProxy 和的 DefaultWebProxy 返回null。
WebRequest.GetSystemWebProxy();
WebRequest.DefaultWebProxy;
解决方案
如果您使用的是最新版本的 monomac (或从源代码编译的话),那么你应该能够调用静态方法 CFNetwork.GetDefaultProxy
(来源,看文件的末尾),以获得的 IWebProxy
实例应匹配什么OSX使用。
Both GetSystemWebProxy and DefaultWebProxy return null.
WebRequest.GetSystemWebProxy();
WebRequest.DefaultWebProxy;
解决方案
If you use a recent version of monomac (or build it from source) then you should be able to call the static method CFNetwork.GetDefaultProxy
(source, look at the end of the file) to get an IWebProxy
instance that should match what OSX is using.
上一篇:自定义SRGS基于格拉默自由格式文本自定义、格拉、文本、格式
下一篇:未能从程序集“mscorlib程序加载类型System.Reflection.IntrospectionExtensions”程序、加载、类型、mscorlib