.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Asad Ali
Fauzul Azmi
Post New Web Links

"Object contains only the public half of a key pair. A private key must also be provided." with 2 .p

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :WPF
 

Here's the code:

using ADPTest.com.adp.hrbws;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Web.Services3.Security;
using Microsoft.Web.Services3.Security.Tokens;
using Microsoft.Web.Services3.Security.Cryptography;

namespace ADPTest
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create the web service proxy.
            HrbService proxy = new HrbService();

            // Add the Username token.
            UsernameToken usernameToken = new UsernameToken("user@ABC"," ");
            proxy.RequestSoapContext.Security.Tokens.Add(usernameToken);

            // Add the certificate for mutual SSL.
            X509Certificate2 mutualCert = new X509Certificate2 "I:\\auth.pem", "


View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend