Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6002893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:02:36+00:00 2026-05-23T01:02:36+00:00

I have a MOSS 2007 farm that requires a client certificate to access. I

  • 0

I have a MOSS 2007 farm that requires a client certificate to access. I have written several methods that use the built in SharePoint services to retrieve data from the site. However, outside of my local test environment everything requires a client cert to access the services.

My method for retrieving the cert is:

private static X509Certificate2 GetCertCreds()
{
     X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
     try
     {
         store.Open(OpenFlags.ReadOnly);
                X509Certificate2Collection certs = store.Certificates.Find(X509FindType.FindBySubjectKeyIdentifier, "SiteIdentityCertificateSerialNumber", true);

         Assert.IsNotNull(certs);

         return certs[0];
     }
     finally
     {
          store.Close();
     }
}

Then in use I have to have something LIKE:

using (ListsServiceProxy.Lists service = new ListsServiceProxy.Lists())
{
    service.Crendentials = GetCredentials();
    XmlNode idResultsNode = service.GetListItems(documentLibraryName, null, queryNode, viewNode, "1", optionNode, null);
}

This is not compiling because of the type mismatch. Am I going about this the wrong way? If not is there a way to use the certificate as the services credentials? I think in end what I’m trying to do is convert an X509Certificate2 to ICredentials. Any help or advice would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:02:36+00:00Added an answer on May 23, 2026 at 1:02 am

    It turns out I had it all wrong. To correctly do this I replaced:

    service.Credentials = GetCertCreds()

    with

    service.ClientCertificates.Add(GetCretCreds());

    Adding the certificate into the service’s client certificates collection is all that needed to happen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We use MOSS 2007, and I have a document library with several document templates
I have a custom web application that integrates with a SharePoint (MOSS 2007) solution.
I have a custom list in SharePoint (specifically, MOSS 2007.) One field is a
I have created a new SharePoint 2007 MOSS Intranet. Our admin people are purchasing
I have a Sharepoint 2007 MOSS People Search webpart, used with a Paging webpart
I'm working on a project that uses MOSS 2007. We have user profiles set
I have a MOSS 2007 running a site that has a public facing form
We have an installation of MOSS 2007 that is using MS SQL 2000 as
I have a MOSS 2007 Webpart that displays data obtained from an external webservice
( Regarding Moss 2007 ) i have created a sharepoint list in which one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.