Hi,

You can browse to the service URL from a PC browser and see the certificate 
details:

https://services.projectcentre.net/pcmobile/2.0/ProjectCentreService.svc

It's a paid certificate and used in production environment and we are consuming 
it from iPhone and WindowsPhone7.

It should be pretty standard to connect to https web service from Android.

Could you please suggest, what needs to be done to consume this web service.

Regards,

 
Nirban Dutta
 
Software Engineer




-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Tuesday, 11 October 2011 12:19 PM
To: [email protected]
Subject: Monodroid Digest, Vol 15, Issue 25

Send Monodroid mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.ximian.com/mailman/listinfo/monodroid
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Monodroid digest..."


Today's Topics:

   1. Re: Calling secured WCF Web Service (Mike Child)


----------------------------------------------------------------------

Message: 1
Date: Mon, 10 Oct 2011 21:18:57 -0400
From: Mike Child <[email protected]>
Subject: Re: [mono-android] Calling secured WCF Web Service
To: Discussions related to Mono for Android
        <[email protected]>
Message-ID:
        <CAA2GyZhb3t39V5+Y84JE+Kvcgm4xTXz7qA=mmke4epsebjg...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

As Jon said in his previous email....

Are you sure it isn't a certificate problem? Specifically, are you able to
connect to the same https URL via Browser without being prompted to
(manually) accept the certificate?

Mono for Android delegates HTTPS certificate authentication to Android, so
if Android/Browser don't like the URL, then your app won't be able to
connect.

 - Jon


When you click on the link you provided...
https://services.projectcentre.net/pcmobile/2.0/ProjectCentreService.svc ,the
browser in Android does prompt you to accept the certificate. This is why
you can't connect in your application to https.


Mike Child


On Mon, Oct 10, 2011 at 6:52 PM, Nirban Dutta <
[email protected]> wrote:

> Hi,****
>
> ** **
>
> I was trying to connect to our secured web service, from android
> application without success:****
>
> ** **
>
> https://services.projectcentre.net/pcmobile/2.0/ProjectCentreService.svc**
> **
>
> ** **
>
> It is accessible through browser.****
>
> ** **
>
> ** **
>
> Regards,****
>
> ** **
>
> ** **
>
> *From:* Nirban Dutta
> *Sent:* Friday, 7 October 2011 9:18 AM
> *To:* '[email protected]'
> *Subject:* Calling secured WCF Web Service****
>
> ** **
>
> Hi,****
>
> ** **
>
> We are able to connect to Web service over HTTP, but failed to connect to
> HTTPS web service.****
>
> ** **
>
> Here is our code and we read a config file and set binding.Security.Mode,
> is there anything else we need to specify for connecting to secured web
> service?****
>
> ** **
>
> ** **
>
> public static ProjectCentreProxy CreateProxy(XElement configurationElement)
> ****
>
>      {****
>
>          var svc = new ProjectCentreProxy();****
>
>          EndpointAddress endpoint;****
>
>          endpoint = (from ep in
> configurationElement.Descendants("endpoint")****
>
>                      select new
> EndpointAddress(ep.Attribute("address").Value)).FirstOrDefault();****
>
> ** **
>
>          var binding = new BasicHttpBinding();****
>
>          string httpConfig = (from ep in
> configurationElement.Descendants("security")****
>
>                               select
> ep.Attribute("mode").Value).FirstOrDefault();****
>
> ** **
>
>          if (!string.IsNullOrEmpty(httpConfig) && httpConfig=="Transport")
> ****
>
>          {****
>
>              binding.Security.Mode =
> System.ServiceModel.BasicHttpSecurityMode.Transport;****
>
>          }****
>
> ** **
>
>          binding.SendTimeout = new TimeSpan(0, 20, 0);****
>
>          binding.MaxReceivedMessageSize = 2147483647;****
>
>          binding.MaxBufferSize = 2147483647;****
>
>          svc.Proxy = new ProjectCentreServiceClient(binding, endpoint);***
> *
>
>          ****
>
>          return svc;****
>
>      }****
>
> ** **
>
> Here is the exception we get:****
>
> ** **
>
> -                              ex
> {System.ServiceModel.EndpointNotFoundException: A system exception has
> occurred. ---> System.Net.WebException: Error: ConnectFailure****
>
>   at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult
> asyncResult) [0x00043] in
> /home/jon/Development/xamarin/mono/mcs/class/System/System.Net/HttpWebRequest.cs:727
> ****
>
>   at
> System.ServiceModel.Channels.HttpRequestChannel+<BeginProcessRequest>c__AnonStoreyA.<>m__7
> (IAsyncResult r) [0x0001d] in
> /home/jon/Development/xamarin/mono/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs:181
> ****
>
> ** **
>
> ** **
>
> Regards,****
>
> ** **
>
>  ****
>
> *Nirban Dutta*
>
>  ****
>
> Software Engineer****
>
> [image: PROJECTCENTRE_LOGO_] <http://www.projectcentre.net>****
>
>  ****
>
> *P* 1300 653 420 |* M* +61 432 675 543 ****
>
> [image: Deloitte_TF50Winner]****
>
> *F* +61 (0) 2 9420 8277****
>
> 3 / 11 Orion Road, Lane Cove, NSW, Australia 2066****
>
> CADX PTY LTD DISCLAIMER: The information contained in this email message is
> CONFIDENTIAL INFORMATION, and may also be LEGALLY PRIVILEGED, intended only
> for the individual or entity named above. If you are not the intended
> recipient, you are hereby notified that any use, review, dissemination,
> distribution or copying of this document is strictly prohibited. If you have
> received this document in error, please immediately notify us by email and
> destroy the original message. CADX disclaims all liability and
> responsibility for any direct or indirect loss or damage that may be
> suffered by any recipient of this message****
>
> ** **
>
> _______________________________________________
> Monodroid mailing list
> [email protected]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.ximian.com/pipermail/monodroid/attachments/20111010/fe3b161d/attachment.html
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 9716 bytes
Desc: not available
Url : 
http://lists.ximian.com/pipermail/monodroid/attachments/20111010/fe3b161d/attachment.jpe
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 25096 bytes
Desc: not available
Url : 
http://lists.ximian.com/pipermail/monodroid/attachments/20111010/fe3b161d/attachment-0001.jpe
 

------------------------------

_______________________________________________
Monodroid mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monodroid


End of Monodroid Digest, Vol 15, Issue 25
*****************************************
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to