Strange System.Security.Authentication.AuthenticationException

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi guys,

I have a strange problem in a piece of code that used to work on my
computer. The code is the following

Private Function _CreateFTPRequest(ByVal url As String, ByVal user As
String, ByVal password As String, ByVal method As String) As
System.Net.FtpWebRequest
Dim request As System.Net.FtpWebRequest = DirectCast
(System.Net.FtpWebRequest.Create(url), System.Net.FtpWebRequest)
request.Credentials = New System.Net.NetworkCredential(user,
password)
request.Method = method
request.UsePassive = True
request.Proxy = Nothing
request.KeepAlive = True
request.UseBinary = True
Return request
End Function

request = _CreateFTPRequest(downloadURL, user, password,
System.Net.WebRequestMethods.Ftp.GetFileSize)
request.EnableSsl = True
System.Net.ServicePointManager.ServerCertificateValidationCallback =
AddressOf _ValidateCertificate
response = DirectCast(request.GetResponse(),
System.Net.FtpWebResponse)

At this point (the call to request.GetResponse) I get the Exception

"System.Security.Authentication.AuthenticationException: A call to
SSPI failed"

and the inner Exception is "The message or signature supplied for
verification has been altered"

The strange fact is that this is running without problems on every pc
I've tested with a DSL connection, but it's not working with a GPRS
usb key supplied by Vodafone. I've already checked, I can connect to
the server using SSL trought this GPRS connection (using Filezilla
client, the server is Filezilla too). Am I forgetting something? The
_ValidateCertificate function is a dummy piece of code that returns
always true...

Thanks for your help

cold
.



Relevant Pages

  • Strange System.Security.Authentication.AuthenticationException
    ... I have a strange problem in a piece of code that used to work on my ... Private Function _CreateFTPRequest(ByVal url As String, ... Dim request As System.Net.FtpWebRequest = DirectCast ...
    (microsoft.public.dotnet.framework)
  • Re: Audit Trail for records
    ... Alias "GetComputerNameA" (ByVal lpBuffer As String, ... 'Purpose: Create a log entry for the form/report being opened. ... rs!DocName = strDoc ... Private Function CurViewAs Variant ...
    (microsoft.public.access.forms)
  • Re: Audit Trail for records
    ... Alias "GetComputerNameA" (ByVal lpBuffer As String, ... 'Purpose: Create a log entry for the form/report being opened. ... rs!DocName = strDoc ... Private Function CurViewAs Variant ...
    (microsoft.public.access.forms)
  • Re: Controlling Javascript from server side
    ... but five different language implementations here. ... 'true' means that the request must be handled asynchronously. ... There is exactly *no* reason for such a thing here. ... | percent-endoded string). ...
    (comp.lang.javascript)
  • Re: txt-file is UTF8 or DOS.
    ... (ByVal lpBuffer As String, ByVal cb As Long, lpi As Long) ... Const Msg$ = "was converted into ansi file " ... Buffer = String, Chr) ... Private Function IsUnicodeStrAs Boolean ...
    (microsoft.public.excel.programming)