2013-03-25 32 views
6

Ben masmavi sunucuya almak için bu kod satırını arıyorum. Onunla nasıl yönetileceğini bilen var mı?WebRequest.Create IOException'ı atar "Belirtilen kayıt defteri anahtarı mevcut değil."</p> <pre><code>var request = (HttpWebRequest)WebRequest.Create(uri); </code></pre> <p>ve bu durum alırsınız:

mscorlib.dll!Microsoft.Win32.RegistryKey.Win32Error(int errorCode, string str) + 0x189 bytes  
mscorlib.dll!Microsoft.Win32.RegistryKey.GetValueKind(string name) + 0x7f bytes 
System.dll!System.Net.HybridWebProxyFinder.InitializeFallbackSettings() + 0xb8 bytes  
System.dll!System.Net.HybridWebProxyFinder.HybridWebProxyFinder() + 0x1e bytes 
[Native to Managed Transition] 
[Managed to Native Transition] 
System.dll!System.Net.HybridWebProxyFinder.HybridWebProxyFinder(System.Net.AutoWebProxyScriptEngine engine) + 0x37 bytes  
System.dll!System.Net.AutoWebProxyScriptEngine.AutoWebProxyScriptEngine(System.Net.WebProxy proxy, bool useRegistry) + 0x190 bytes 
System.dll!System.Net.WebProxy.UnsafeUpdateFromRegistry() + 0x67 bytes 
System.dll!System.Net.WebProxy.WebProxy(bool enableAutoproxy) + 0x44 bytes 
System.dll!System.Net.Configuration.DefaultProxySectionInternal.DefaultProxySectionInternal(System.Net.Configuration.DefaultProxySection section) + 0x3d9 bytes 
System.dll!System.Net.Configuration.DefaultProxySectionInternal.GetSection() + 0xbe bytes 
System.dll!System.Net.WebRequest.InternalDefaultWebProxy.get() + 0x7e bytes 
System.dll!System.Net.HttpWebRequest.HttpWebRequest(System.Uri uri, System.Net.ServicePoint servicePoint) + 0x18d bytes 
System.dll!System.Net.HttpRequestCreator.Create(System.Uri Uri) + 0x50 bytes  
System.dll!System.Net.WebRequest.Create(System.Uri requestUri, bool useUriBase) + 0x2ec bytes 
System.dll!System.Net.WebRequest.Create(string requestUriString) + 0xa3 bytes 
+0

Tamam, farklı çağrı yığınlarımız olmasına rağmen, LegacyWPADSupport'un çözümüne yardımcı olduğu görülüyor. –

+0

Bunu hiç çözdün mü? – skimania

+2

Evet. Bu çözüm, farklı çağrı yığınlarımız olmasına rağmen, http://stackoverflow.com/questions/13141434/httpclient-request-throws-ioexception/13745641#13745641'e yardımcı oldu. –

cevap

3

Bu çözüm, farklı çağrı yığınlarımız olmasına rağmen HttpClient request throws IOException'un kullanılmasına yardımcı oldu.

Kayıt defterinde bu anahtarları oluşturmanız gerekir.

adı: "LegacyWPADSupport" türü: "dword" veriler: 00000000

Yol: HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft

Yol: Microsoft \ .NETFramework

Anahtar \ HKEY_LOCAL_MACHINE \ SOFTWARE \ .NETFramework

Anahtar:

adı: "LegacyWPADSupport" türü: "dword" veriler: 00000000

+2

Tamlık için, anahtarlar şunlardır: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ .NETFramework ve HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ .NETFramework – Rob

+0

Teşekkürler. Biçimlendirme, noktadan önce eğik çizgi (\.) Yemiş. Doğru görüntü için cevabı düzenledim. –

İlgili konular