Proxy Server Support

Apr 17, 2009 at 2:09 PM
I've been using this library with SpaceBlock and it didn't work in my Office location as our corporate network has a Proxy Server (Microsoft ISA Server) to the Internet.

I pulled the source to this library (ChangeSet 24128) and figured out that the solution to this is simple. I'm not very familiar with how CodePlex's code check-in works so I'll just document the solution to adding the support here.

Simply insert these two lines at line 387 of class "CodePlex.Resourceful.Client" (in file Client.cs):

            httpRequest.Proxy = WebRequest.GetSystemWebProxy();
            if (httpRequest.Proxy != null) httpRequest.Proxy.Credentials = CredentialCache.DefaultCredentials;

This sets the proxy for the httpWebRequest object created on line 386. It should also work just fine if there is no Proxy in the network, too.

Regards,

- Adam Hems

Coordinator
Apr 17, 2009 at 4:20 PM
Thanks! I'll get this into the next version.

On Fri, Apr 17, 2009 at 10:09 AM, adamhems <notifications@codeplex.com> wrote:

From: adamhems

I've been using this library with SpaceBlock and it didn't work in my Office location as our corporate network has a Proxy Server (Microsoft ISA Server) to the Internet.

I pulled the source to this library (ChangeSet 24128) and figured out that the solution to this is simple. I'm not very familiar with how CodePlex's code check-in works so I'll just document the solution to adding the support here.

Simply insert these two lines at line 387 of class "CodePlex.Resourceful.Client" (in file Client.cs):

            httpRequest.Proxy = WebRequest.GetSystemWebProxy();
            if (httpRequest.Proxy != null) httpRequest.Proxy.Credentials = CredentialCache.DefaultCredentials;

This sets the proxy for the httpWebRequest object created on line 386. It should also work just fine if there is no Proxy in the network, too.

Regards,

- Adam Hems

Read the full discussion online.

To add a post to this discussion, reply to this email (resourceful@discussions.codeplex.com)

To start a new discussion for this project, email resourceful@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com