Proxy issue

Discussion in 'ASP .Net Web Services' started by Craig Buchanan, Jul 27, 2006.

  1. I am able to connect Asp.Net v2 application to a remote .Net v2 webservice
    by specifying the proxy settings in code:

    Dim proxy As WebProxy = New WebProxy("proxy.company.com:80")
    proxy.Credentials = CredentialCache.DefaultCredentials
    dim service as New RemoteWebservice
    service.Proxy = proxy

    I thought it would make more sense to move this to the application's
    web.config file. I created the following entry:

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <system.net>
    <defaultProxy>
    <proxy
    usesystemdefault = "false"
    proxyaddress="http://proxy.company.com"
    bypassonlocal="true"
    />
    </defaultProxy>
    </system.net>
    ...
    </configuration>

    Finally, I removed the proxy coding listed above.

    When I run the application, i get an error that reads:

    HTTP status 407: Proxy Authentication Required

    Is there an issue w/ my web.config file, does there need to be additional
    coding to get the proxy settings from the web.config file or it is something
    else?

    Thanks for the help.

    Craig Buchanan
    Craig Buchanan, Jul 27, 2006
    #1
    1. Advertising

  2. I am having the same problem. The log on my ISA proxy server shows the
    initial incoming request as "anonymous" and then does not show any subsequent
    requests from the client to send the NTLM credentials. I have also looked at
    the HTTP traffic on the client (using Fiddler) and I see the same thing --the
    proxy returns 407 and the client never resends the request.

    Note that my client is using .NET 1.1 with that standard .NET generated
    proxies that derive from SoapHttpClientProtocol.

    Can anyone comment on whether or not this is a known issue?

    "Craig Buchanan" wrote:

    > I am able to connect Asp.Net v2 application to a remote .Net v2 webservice
    > by specifying the proxy settings in code:
    >
    > Dim proxy As WebProxy = New WebProxy("proxy.company.com:80")
    > proxy.Credentials = CredentialCache.DefaultCredentials
    > dim service as New RemoteWebservice
    > service.Proxy = proxy
    >
    > I thought it would make more sense to move this to the application's
    > web.config file. I created the following entry:
    >
    > <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    > <system.net>
    > <defaultProxy>
    > <proxy
    > usesystemdefault = "false"
    > proxyaddress="http://proxy.company.com"
    > bypassonlocal="true"
    > />
    > </defaultProxy>
    > </system.net>
    > ...
    > </configuration>
    >
    > Finally, I removed the proxy coding listed above.
    >
    > When I run the application, i get an error that reads:
    >
    > HTTP status 407: Proxy Authentication Required
    >
    > Is there an issue w/ my web.config file, does there need to be additional
    > coding to get the proxy settings from the web.config file or it is something
    > else?
    >
    > Thanks for the help.
    >
    > Craig Buchanan
    >
    >
    >
    Anderw Miller, Aug 23, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vidy5300
    Replies:
    0
    Views:
    865
    vidy5300
    Jun 7, 2004
  2. Replies:
    0
    Views:
    1,643
  3. Karsten Wutzke
    Replies:
    1
    Views:
    876
    Steven Simpson
    Aug 20, 2007
  4. Klein Stéphane
    Replies:
    3
    Views:
    593
    Steve Holden
    Dec 20, 2009
  5. Alejandro Molina

    Proxy and non Proxy configurations

    Alejandro Molina, Jul 15, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    148
    Alejandro Molina
    Jul 15, 2004
Loading...

Share This Page