Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WebClient with SSL

Status
Not open for further replies.

REM2500

MIS
Nov 25, 2000
17
US
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();

}
}

 
I have been looking through posts on Google for about a week now and hadn't really found anything that was of any help.

REM2500
 
Just to update in case anyone else has a similar issue, this was a bug in NetBeans 6.x. I verified that by dropping the same code into NetBeans 5.5 and it worked perfectly.

REM2500
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top