Group:  .NET General / Allgemein ยป microsoft.public.dotnet.framework
Thread: Strange System.Security.Authentication.AuthenticationException

Strange System.Security.Authentication.AuthenticationException
cold80 <sebastiano.gazzola[ at ]gmail.com> 12/23/2008 8:11:27 AM
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

Home | Search | Terms | Imprint
Newsgroups Reader