[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

steven.harris

8/14/2003 10:24:00 AM

Hi.

I've read several posts on this and the general consensus seems to be
if you override the GetWebRequest and set .KeepAlive = False it cures
the problem.

This worked well BUT after-setting this I was unable to get proxy
authentication working, always getting a 407 Proxy Authentication
required.

I have tried several ways of getting through the proxy i.e.

1. g_PROXY.Credentials = New Net.NetworkCredential(txtUsername.Text,
txtPassword.Text, txtDomain.Text)

2. 'Dim netCred As New System.Net.NetworkCredential
'netCred.UserName = txtUsername.Text
'netCred.Password = txtPassword.Text
'netCred.Domain = txtDomain.Text

'Dim objCredentials As New System.Net.CredentialCache
'objCredentials.Add(New Uri(g_WEBREF.Url), "NTLM", netCred)
'objCredentials.Add(New Uri(g_WEBREF.Url), "BASIC", netCred)
'g_PROXY.Credentials = objCredentials

So to sum it up, If I dont override the GetWebRequest and leave
".KeepAlive = True" then
it all works fine, with and without supplying crudentials (username,
password, domain).

Can anyone tell me why setting .KeepAlive = False cause proxy
authentication problems???

Many Thanks
Steve.