Re: Windows Service connecting to Web Service
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 07/30/04
- Next message: Yuri Padorin: "Re: Windows Service connecting to Web Service"
- Previous message: Rob Teixeira [MVP]: "Re: MD4 class in VB.NET"
- In reply to: Yuri Padorin: "Re: Windows Service connecting to Web Service"
- Next in thread: Yuri Padorin: "Re: Windows Service connecting to Web Service"
- Reply: Yuri Padorin: "Re: Windows Service connecting to Web Service"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 29 Jul 2004 23:59:20 -0500
Another thing you can do in this case is implement a simple
ICertificatePolicy class that always returns true and add that to the
ServicePointManager.CertificatePolicy property. That will essentially
disable cert error checking and should prove if that is the problem. All in
all, it is better to resolve correctly though.
Joe K.
"Yuri Padorin" <YuriPadorin@discussions.microsoft.com> wrote in message
news:382F5311-1449-4187-8490-395A37456FAC@microsoft.com...
> Nicole,
> It is conceivable that the root CA cert is loaded in my profile (where the
command line client runs) and not the machine profile or at least the
"localservice" profile (that the windows service would be able to access
it). I'll try running the service under my credentials.
>
> "Nicole Calinoiu" wrote:
>
> > Yuri,
> >
> > Are you sure the problem isn't with the SSL connection? If you navigate
to
> > the web service address with a web browser, do you receive any
certificate
> > warnings?
> >
> > Nicole
> >
> >
> > "Yuri Padorin" <Yuri Padorin@discussions.microsoft.com> wrote in message
> > news:5E5C5F84-EF86-4750-96CE-C5FAA0E023C9@microsoft.com...
> > > I've got a console app that uses a filesystemwatcher to monitor a
> > > directory for new log files. It then parses the data in the file into
a
> > > dataset upon creation, then connects and sends the dataset to a
> > > webservice.
> > > The connection to the web service is HTTPS and it reads NTLM
credentials
> > > into a CredentialCache from a configuration file.
> > > Works like a charm, no problems.
> > > I have attempted to create a windows service to do the same, however,
I
> > > continue to get a "Could not establish trust relationship with remote
> > > server" WebException.
> > > I've run the service under the LocalService and the Local System
accounts.
> > > I've also debugged the process and confirmed that the credentials
stored
> > > in the app.config has been loaded.
> > > The network on which the windows service is to reside is separate from
the
> > > web service.
> > > I have to keep the web service secure, (I have tried basic
authentication
> > > also, since I'm already SSL, with the same results).
> > > So what am I missing to get the windows service to authenticate using
the
> > > cached credentials?
> > >
> >
> >
> >
- Next message: Yuri Padorin: "Re: Windows Service connecting to Web Service"
- Previous message: Rob Teixeira [MVP]: "Re: MD4 class in VB.NET"
- In reply to: Yuri Padorin: "Re: Windows Service connecting to Web Service"
- Next in thread: Yuri Padorin: "Re: Windows Service connecting to Web Service"
- Reply: Yuri Padorin: "Re: Windows Service connecting to Web Service"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|