Re: TrustFailure accessing web service from Smart Device application.

From: Chris Botha (chris_s_botha_at_hotmail.com)
Date: 08/28/03

  • Next message: cindy liu: "how to get Windows logon credential?"
    Date: Thu, 28 Aug 2003 16:55:58 -0400
    
    

    The reason why you web service call fails, is because of the fact that "the
    certificate name doesn't match the server name".
    This is true for desktop web service calls as well. If you use IE, pocket or
    desktop, and it comes back with that message, you will not be able to call
    web services on that server using SSL.

    The reason why "the certificate name doesn't match the server name", is what
    it says. If your computer is www.mywebsite.com, then your certificate must
    be made out to www.mywebsite.com as well. I'm not sure if this can be
    achieved by generating your own test certificates for your test server, but
    ask on the IIS newsgroups.

    "John Hynes" <john@hynes.plus.com> wrote in message
    news:rLn3b.956$4L1.168580@wards.force9.net...
    > I have a web service which is set up to require SSL and basic
    > Authentication.
    >
    > I can access this service from the browser on a PocketPC device - it
    prompts
    > me to confirm that I will accept the certificate as the name doesnt match
    > the server name (don't know why!), then prompts me for network username
    and
    > password, then displays the web services - no problem.
    >
    > I have a Smart Device application which tries to access the web service by
    > setting up a NetworkCredential object then calling a method on the web
    > service. It throws an exception "Could not establish trust relationship
    with
    > remote server".
    >
    > If I remove the requireSSL option, and rebuild the application with http
    > rather than https everything works OK.
    >
    > Anyone know why this works from the browser but not the application?
    >
    > Code is fairly simple:
    >
    > MobileService ms = new MobileService();
    > ms.Timeout=10000;
    > ms.Url = "https://.....";
    > ms.Credentials = new NetworkCredentials( username, password, domain );
    > ms.PreAuthenticate = true;
    > ms.MyMethod( ... ); --> this throws an exception
    >
    > Thanks
    > John
    >
    >


  • Next message: cindy liu: "how to get Windows logon credential?"

    Relevant Pages

    • Re: Using Microsoft Certificate Server Programatically
      ... Client contacts server (web service) with encrypted registration ... The server issues the certificate (not sure how the web service ...
      (microsoft.public.platformsdk.security)
    • Re: Question about using pre-signed certificates
      ... The owner of the web service asked for a certificate ... He provided the certificate and I imported it into my Local ... When I went back to the web server ... > received the error message. ...
      (microsoft.public.dotnet.framework.webservices)
    • Question about using pre-signed certificates
      ... The owner of the web service asked for a certificate request ... He provided the certificate and I imported it into my Local ... After fixing the issue (was proxy server related), ... I would guess a problem with the cert, ...
      (microsoft.public.dotnet.framework.webservices)
    • RE: Web Service Implementation Security Question
      ... Server was unable to process ... CompilerParameters parameters, Assembly assembly, Hashtable assemblies) at ... > As for the security problems regarding on using TypedDAtaset in asp.net ... Web Service Implementation Security Question ...
      (microsoft.public.inetserver.iis.security)
    • Re: Permission Errors
      ... >a domain account so that it can be validated on the win2k server machine. ... However I have discovered that I can deploy the web service to the W2K ... domain server and there it runs with no problems, ... for me to decide that the new XP dev machine is up and usable. ...
      (microsoft.public.dotnet.general)