Hi all. I have a WebServer running in Glassfish and a WebClient in Visual Studio written in C#.
The client is only a form that has a button and a text box. When you click the button, it passes 2 numbers to the server, the server adds them, then sends the solution back to the client and displays it in the form's text box. This works perfect without SSL turned on.
When I turn on SSL, I have a certificate that I have created for Glassfish and have imported it into my certificate manager in Windows. Then I added code to the client to find the certificate. When I run it now, I get a 403 Unauthorized error at the point where it passes the numbers to the server (the line that reads: int a = service.add(2, 4)
. Do I need to encrypt the passage of the numbers some how?
Thanks for any help!
REM2500
Here is my code:
private void button1_Click(object sender, EventArgs e)
{
X509Store store = new X509Store(StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection col = store.Certificates.Find(X509FindType.FindBySerialNumber, "serial # of cert", true);
NewWebServiceService service = new NewWebServiceService();
if (col.Count == 1)
{
int a = service.add(2, 4);
textBox1.Text = a.ToString();
}
}
The client is only a form that has a button and a text box. When you click the button, it passes 2 numbers to the server, the server adds them, then sends the solution back to the client and displays it in the form's text box. This works perfect without SSL turned on.
When I turn on SSL, I have a certificate that I have created for Glassfish and have imported it into my certificate manager in Windows. Then I added code to the client to find the certificate. When I run it now, I get a 403 Unauthorized error at the point where it passes the numbers to the server (the line that reads: int a = service.add(2, 4)
. Do I need to encrypt the passage of the numbers some how?
Thanks for any help!
REM2500
Here is my code:
private void button1_Click(object sender, EventArgs e)
{
X509Store store = new X509Store(StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection col = store.Certificates.Find(X509FindType.FindBySerialNumber, "serial # of cert", true);
NewWebServiceService service = new NewWebServiceService();
if (col.Count == 1)
{
int a = service.add(2, 4);
textBox1.Text = a.ToString();
}
}