Hello friends,
I am making an httpconnection with the following code.
When I run this code with the HTTP address it runs fine. But when I run the
same code with HTTPS address in jam file it gives an httpConnection
Exception, at the line httpCon.connect();
I have taken a "VariSign Server Test CA" trial certificate for SSL in IIS.
The page opens fine on the browser window. Even when I put a breakpoint at
the Response.Write line in C# the control comes there. Is there any
particular settings which are required to be done on IIS.
Kindly help me solving this problem.
Doja Code
----------------------------------------------------------------------------
-------------------------------------------------------
String strURL =IApplication.getCurrentApp().getSourceURL() +
"Test.aspx";
try {
if(httpCon != null)
CloseConnection();
httpCon =(HttpConnection) Connector.open(strURL,
Connector.READ_WRITE, true);
httpCon.setRequestMethod(HttpConnection.POST);
httpCon.setRequestProperty("Content-Type", "text/plain");
httpCon.connect();
if (httpCon.getResponseCode() == HttpConnection.HTTP_OK) {
..............
..............
----------------------------------------------------------------------------
-------------------------------------------------------
C# Code
----------------------------------------------------------------------------
-------------------------------------------------------
private void Page_Load(object sender, System.EventArgs e)
{
Response.Write("hello world");
}
----------------------------------------------------------------------------
-------------------------------------------------------
Thanks & Regards,
Rajat Kaushal.
Received on Sat Jan 14 10:50:15 2006