[Mono-list] Authentication or decryption failure when accessing secure SOAP service (mono 2.6.3 (Debian 2.6.3-2~dhx1))
Jensen Somers
jensen.somers at gmail.com
Tue Jul 27 16:52:29 EDT 2010
Hello,
Yesterday I filed a bug
(https://bugzilla.novell.com/show_bug.cgi?id=625734) but since it's
quite urgent I'm gonna try my luck here. Maybe there's something I'm
missing or I need to do extra and I hope to get a faster response
here.
I have a piece of code which is accessing a SOAP service. I generated
the service .cs file on Windows using the wsdl command and wrote a
small sample application which works perfectly. I then tried to
compile and run this under mono 2.6.3 (Debian 2.6.3-2~dhx1).
Everything compiled but when I try to run I am getting the following
error:
Error writing request: The authentication or decryption has failed.
at System.Net.WebConnectionStream.WriteHeaders () [0x00000] in
<filenameunknown>:0
at System.Net.WebConnectionStream.SetHeaders (System.Byte[] buffer)
[0x00000]in <filename unknown>:0
at (wrapper remoting-invoke-with-check)
System.Net.WebConnectionStream:SetHeaders (byte[])
at System.Net.HttpWebRequest.SendRequestHeaders (Boolean
propagate_error) [0x00000] in <filename unknown>:0
The code responsible for this is the following:
try
{
TelemeterService service = new TelemeterService ();
RetrieveUsageRequestType usageRequestType = new RetrieveUsageRequestType
{
UserId = "",
Password = ""
};
RetrieveUsageResponseType usageResponseType = service.retrieveUsage
(usageRequestType);
StageType stage = usageResponseType.Item as StageType;
if (stage != null)
{
Console.WriteLine (stage.Description);
}
}
catch (Exception ex)
{
Console.WriteLine (ex.Message);
Console.WriteLine (ex.StackTrace);
}
As you can see there's nothing really special. Is it a problem that I
generated the service source file (which is attached to the bug report
I mentioned earlier) under Windows? I tried it on Linux but got the
following error:
jensen at atlantis:~$ wsdl https://t4t.services.telenet.be/TelemeterService.wsdl
Web Services Description Language Utility
Mono Framework v2.0.50727.1433
Error: Error getting response stream (Trust failure): TrustFailure
Stack:
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult
asyncResult) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0
at System.Web.Services.Discovery.DiscoveryClientProtocol.Download
(System.String& url, System.String& contentType) [0x00000] in
<filename unknown>:0
at System.Web.Services.Discovery.DiscoveryClientProtocol.DiscoverAny
(System.String url) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check)
System.Web.Services.Discovery.DiscoveryClientProtocol:DiscoverAny
(string)
at Mono.WebServices.Driver.Run (System.String[] args) [0x00000] in
<filename unknown>:0
So my main questions are: why is it not working under mono, but
perfectly when using .net 3.5 on Windows and is there something
special I need to do in order to get things working?
Regards,
- Jensen
More information about the Mono-list
mailing list