在Windows 7计算机上出现.net 2.0应用程序问题 [英] Issue with a .net 2.0 application on windows 7 machine
问题描述
大家好,
我有一个.net 2.0 Windows应用程序。它在Windows XP和Vista上也运行良好。但是最近我的一些客户已经转向Windows 7,他们正在解决一些问题。
我的应用程序正在谈论到SOAP Web服务。我没有代理,甚至试图禁用防火墙。一旦我从我的应用程序调用webservice方法我在Windows 7机器上得到以下错误。我也尝试更改
兼容性模式..
System.Configuration.ConfigurationErrorsException:创建"system.net/defaultProxy"配置部分中指定的Web代理时出错。 ---> System.ArgumentException:值不在预期范围内。
在System.String.nativeCompareOrdinal(String strA,String strB,Boolean bIgnoreCase)
at System.String.Compare(String strA,String strB,StringComparison comparisonType)
at System.Diagnostics.PerformanceCounter.set_CategoryName(String value)
在System.Net.NetworkingPerfCounters.Initialize()
在System.Net.Configuration.SettingsSectionInternal..ctor(SettingsSection部分)
在System.Net.Configuration.SettingsSectionInternal.get_Section()
在System.Net.Sockets.Socket.InitializeSockets()
在System.Net.NetworkAddressChangePolled..ctor()
在System.Net.AutoWebProxyScriptEngine.AutoDetector.Initialize()
在System.Net.AutoWebProxyScriptEngine.AutoDetector.get_CurrentAutoDetector()
在System.Net.AutoWebProxyScriptEngine..ctor(WebProxy proxy,Boolean useRegistry)
在System.Net.WebProxy.UnsafeUpdateFromRegistry()
在System.Net.WebProxy..ctor(布尔值enableAutoproxy)
在System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection部分)
在System.Net.Configuration.DefaultProxySectionInternal.GetSection()
---内部异常堆栈跟踪结束---
在System.Net.Configuration.DefaultProxySectionInternal.GetSection()
在System.Net.WebRequest.get_InternalDefaultWebProxy()
在System.Net.HttpWebRequest..ctor(Uri uri,ServicePoint servicePoint)
在System.Net.HttpRequestCreator.Create(Uri Uri)
在System.Net.WebRequest.Create(Uri requestUri,Boolean useUriBase)
在System.Net.WebRequest.Create(Uri requestUri)
在System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
在System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
在System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)
在System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(字符串方法名,对象[]参数)
 我已经尝试了许多在网络上的选项然而没有太多喜悦几天。
任何帮助将不胜感激。
干杯
A
我认为每次启动都会发生这种情况?
我不认为这样与代理有关,但与常规框架启动代码有关。 我知道NetworkingPerfCounters是在.NET 4.0中重写的,所以你可以试试。
我还会检查你的应用程序运行的安全级别。
Hi All,
I have a .net 2.0 Windows application. It has been working well on Windows XP and Vista as well.However lately some of my clients have moved on to windows 7 and they are encounting a few problems.
My application is talking to a SOAP Web service. I do not have proxy and even tried to disable the fire wall as well.As soon as I make a method call to the webservice from my application I get the following error on windows 7 machine.Also I have tried changing the compatiablity mode..
System.Configuration.ConfigurationErrorsException: Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section. ---> System.ArgumentException: Value does not fall within the expected range.
at System.String.nativeCompareOrdinal(String strA, String strB, Boolean bIgnoreCase)
at System.String.Compare(String strA, String strB, StringComparison comparisonType)
at System.Diagnostics.PerformanceCounter.set_CategoryName(String value)
at System.Net.NetworkingPerfCounters.Initialize()
at System.Net.Configuration.SettingsSectionInternal..ctor(SettingsSection section)
at System.Net.Configuration.SettingsSectionInternal.get_Section()
at System.Net.Sockets.Socket.InitializeSockets()
at System.Net.NetworkAddressChangePolled..ctor()
at System.Net.AutoWebProxyScriptEngine.AutoDetector.Initialize()
at System.Net.AutoWebProxyScriptEngine.AutoDetector.get_CurrentAutoDetector()
at System.Net.AutoWebProxyScriptEngine..ctor(WebProxy proxy, Boolean useRegistry)
at System.Net.WebProxy.UnsafeUpdateFromRegistry()
at System.Net.WebProxy..ctor(Boolean enableAutoproxy)
at System.Net.Configuration.DefaultProxySectionInternal..ctor(DefaultProxySection section)
at System.Net.Configuration.DefaultProxySectionInternal.GetSection()
--- End of inner exception stack trace ---
at System.Net.Configuration.DefaultProxySectionInternal.GetSection()
at System.Net.WebRequest.get_InternalDefaultWebProxy()
at System.Net.HttpWebRequest..ctor(Uri uri, ServicePoint servicePoint)
at System.Net.HttpRequestCreator.Create(Uri Uri)
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.Web.Services.Protocols.WebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.GetWebRequest(Uri uri)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
I have tried out lots of options on the web however without much joy for few days.
Any help will be appreciated on this fornt.
Cheers
A
I assume this happens at startup every time?
I don't think it has anything to do with proxies, but regular framework initilization code. I do know that the NetworkingPerfCounters was rewritten in .NET 4.0, so you might try that.
I would also check the security level your application is running at.
这篇关于在Windows 7计算机上出现.net 2.0应用程序问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!