Code Monkey home page Code Monkey logo

Comments (14)

dgrunwald avatar dgrunwald commented on July 24, 2024

Which ILSpy version are you using?
The current versions (starting with build 0.1.0.406) should work fine behind a proxy.

from ilspy.

fhtino avatar fhtino commented on July 24, 2024

1.0.0.417

from ilspy.

gritcsenko avatar gritcsenko commented on July 24, 2024

1.0.0.687
System.AggregateException: One or more errors occurred. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it _..231.66:80
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task1.get_Result() at ICSharpCode.ILSpy.AboutPage.<>c__DisplayClass7.<AddUpdateCheckButton>b__6(Task1 task)
---> (Inner Exception #0) System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it **
.**_.231.66:80
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---

from ilspy.

jlkeesey avatar jlkeesey commented on July 24, 2024

1.0.0.737

Same problem:

System.AggregateException: One or more errors occurred. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 195.234.231.66:80
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.get_Result()
   at ICSharpCode.ILSpy.AboutPage.<>c__DisplayClass7.<AddUpdateCheckButton>b__6(Task`1 task)
---> (Inner Exception #0) System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 195.234.231.66:80
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---

from ilspy.

dgrunwald avatar dgrunwald commented on July 24, 2024

Please reopen if this issue occurs again (in 1.0.0.824 or later). I've never used the .NET proxy stuff before, so I don't exactly know what I'm doing here ;)

from ilspy.

jonparker avatar jonparker commented on July 24, 2024

1.0.0.826

System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task1.get_Result() at ICSharpCode.ILSpy.AboutPage.<>c__DisplayClass7.<AddUpdateCheckButton>b__6(Task1 task)
---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---

from ilspy.

jonparker avatar jonparker commented on July 24, 2024

Reopen issue - note that I am using a proxy script not just a proxy server.
It should be working in .NET 2.0+ though
http://msdn.microsoft.com/en-us/magazine/cc300743.aspx#S3

from ilspy.

dgrunwald avatar dgrunwald commented on July 24, 2024

I cannot reproduce this problem. I tried both a manually configured proxy and using a configuration script; and ILSpy correctly uses the proxy in both cases.

from ilspy.

jonparker avatar jonparker commented on July 24, 2024

I still get the same error (I'm using version 1.0.0.826 with debugger) also checked with binary version 1.0.0.943 and same error.

When I set the proxy manually it works.
Note that my proxy settings are:

Use configuration script checkbox is checked and the address has a URL to the proxy script in it (not just a direct link to proxy server):

http://intranetserver/proxy/proxy.pac

The actual proxy is another server.

static Task GetLatestVersionAsync()
{
var tcs = new TaskCompletionSource();
WebClient wc = new WebClient();
wc.UseDefaultCredentials = true;
wc.Proxy = new WebProxy
{
UseDefaultCredentials = true,
Address = new Uri("http://my-proxy:80")
};
wc.DownloadDataCompleted += delegate(object sender, DownloadDataCompletedEventArgs e) {
if (e.Error != null) {
tcs.SetException(e.Error);
} else {
try {
XDocument doc = XDocument.Load(new MemoryStream(e.Result));
var bands = doc.Root.Elements("band");
var currentBand = bands.FirstOrDefault(b => (string)b.Attribute("id") == "stable") ?? bands.First();
Version version = new Version((string)currentBand.Element("latestVersion"));
string url = (string)currentBand.Element("downloadUrl");
if (!(url.StartsWith("http://", StringComparison.Ordinal) || url.StartsWith("https://", StringComparison.Ordinal)))
url = null; // don't accept non-urls
latestAvailableVersion = new AvailableVersionInfo { Version = version, DownloadUrl = url };
tcs.SetResult(latestAvailableVersion);
} catch (Exception ex) {
tcs.SetException(ex);
}
}
};
wc.DownloadDataAsync(UpdateUrl);
return tcs.Task;
}

from ilspy.

dgrunwald avatar dgrunwald commented on July 24, 2024

Won't fix for 1.0; simply because I can't reproduce this on my machine.
I'm happy to hear about any ideas on how to fix this.

from ilspy.

dgrunwald avatar dgrunwald commented on July 24, 2024

Can you try this again with version 2.0.0.1370?
I hope this time it'll work correctly with proxies requiring authentication. I tested it without proxy and with a proxy configuration script (but my proxy server doesn't require authentication).

from ilspy.

fhtino avatar fhtino commented on July 24, 2024

2.0.0.1370 works fine. :)

from ilspy.

tomfanning avatar tomfanning commented on July 24, 2024

Version 1.0.0.1000 gives the following stack trace behind Microsoft ISA Server (authenticated proxy)

System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.get_Result()
   at ICSharpCode.ILSpy.AboutPage.<>c__DisplayClass7.<AddUpdateCheckButton>b__6(Task`1 task)
---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---

Placing the following text in a file called ILSpy.exe.config alongside ILSpy.exe fixes the issue:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.net>
    <defaultProxy useDefaultCredentials="true" />
  </system.net>
</configuration>

from ilspy.

tomfanning avatar tomfanning commented on July 24, 2024

Fixed in the 2.0.0.1525 nightly without the workaround above.

from ilspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.