2013-03-25 8 views
6

मैं नीला सर्वर से प्राप्त करने के लिए कोड की इस पंक्ति बोल रहा हूँ:WebRequest.Create IOException फेंकता है "निर्दिष्ट रजिस्ट्री कुंजी मौजूद नहीं है।"

var request = (HttpWebRequest)WebRequest.Create(uri); 

और इस अपवाद प्राप्त करते हैं। क्या कोई जानता है कि इसका प्रबंधन कैसे करें?

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

ठीक है, ऐसा लगता है कि LegacyWPADSupport के साथ समाधान में मदद मिली है, हालांकि हमारे पास अलग-अलग कॉल स्टैक हैं। –

+0

क्या आपने कभी इसे हल किया है? – skimania

+2

हां। इस समाधान ने http://stackoverflow.com/questions/13141434/httpclient-request-throws-ioexception/13745641#13745641 की सहायता की, हालांकि हमारे पास अलग-अलग कॉल स्टैक हैं। –

उत्तर

3

यह समाधान HttpClient request throws IOException मदद की है, हालांकि हम अलग-अलग कॉल के ढेर है।

आपको रजिस्ट्री में इन कुंजी को बनाने की आवश्यकता है।

पथ: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ .NETFramework

कुंजी:

नाम: "LegacyWPADSupport" प्रकार: "DWORD" डेटा: 00000000

पथ: HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ .NETFramework

कुंजी:

नाम: "LegacyWPADSupport" प्रकार: "DWORD" डेटा: 00000000

+2

पूर्णता के लिए, कुंजियां हैं: HKEY_LOCAL_MACHINE \ सॉफ़्टवेयर \ Microsoft \ .NETFramework और HKEY_LOCAL_MACHINE \ सॉफ़्टवेयर \ Wow6432Node \ Microsoft \ .NETFramework – Rob

+0

धन्यवाद। स्वरूपण ने डॉट (\।) से पहले स्लैश खा लिया है। मैंने सही प्रदर्शन के लिए उत्तर संपादित किया है। –

संबंधित मुद्दे