Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / June 2004

Tip: Looking for answers? Try searching our database.

Certificate handling

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stewart Bourke - 21 Jun 2004 14:39 GMT
I have added the following class to my code for consuming a webservice.  I
want to be able to accept all certificates for testing etc..

public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy
{
public TrustAllCertificatePolicy()
{}

public bool CheckValidationResult(ServicePoint sp,
 X509Certificate cert,WebRequest req, int problem)
{
 return true;
}
}

However, when I try to build the application, I get the build error:

'TrustAllCertificatePolicy' does not implement interface member
'System.Net.ICertificatePolicy.CheckValidationResult(System.Net.ServicePoint
, System.Security.Cryptography.X509Certificates.X509Certificate,
System.Net.WebRequest, int)'

Any ideas?

Thanks,

Stewart Bourke
Stewart Bourke - 22 Jun 2004 01:35 GMT
Perhaps a bit more info would be in order:

vs.net 2003, c#,wse1

trying to define a customised version of iCertificatePolicy to allow all
certificates be accepted whilst developing/testing...

I have added this code in the main form of a webservice application which
consumes an x509-signed webservice...

No matter where I put the definition in the form1.cs, I get this compile
error...

> I have added the following class to my code for consuming a webservice.  I
> want to be able to accept all certificates for testing etc..
[quoted text clipped - 14 lines]
>
> 'TrustAllCertificatePolicy' does not implement interface member

'System.Net.ICertificatePolicy.CheckValidationResult(System.Net.ServicePoint
> , System.Security.Cryptography.X509Certificates.X509Certificate,
> System.Net.WebRequest, int)'
[quoted text clipped - 4 lines]
>
> Stewart Bourke
Stewart Bourke - 23 Jun 2004 00:02 GMT
any takers?

> Perhaps a bit more info would be in order:
>
[quoted text clipped - 27 lines]
> >
> > 'TrustAllCertificatePolicy' does not implement interface member

'System.Net.ICertificatePolicy.CheckValidationResult(System.Net.ServicePoint
> > , System.Security.Cryptography.X509Certificates.X509Certificate,
> > System.Net.WebRequest, int)'
[quoted text clipped - 4 lines]
> >
> > Stewart Bourke

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.