Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, All

 

I have a Problem with Proxy. I want to download file from a Server. But when I using proxy it gives me "The remote server returned an error (407) Proxy authentication Required" error message.

 

This is my code.

 

Dim wclient As New System.Net.WebClient

If mySettings.mProxy = 1 Then

  System.Net.GlobalProxySelection.Select = New    System.Net.WebProxy("http://" & mySettings.mProxyIP & ":" & mySettings.mProxyPort)
       wclient.Credentials = New System.Net.NetworkCredential(mySettings.mProxyName, mySettings.mProxyPass)                            
End If
         wclient.DownloadFile(pathUpdate & "lastVersion.ini", mySettingsPath & "lastVersion.ini")
                       Catch ex As Exception
                               MsgBox(" lasVersion : " & ex.Message)
                       End Try

 

Please help me. Tell me how can I download file with Proxy

 

Thanks,

Erdenemandal

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...