Results 1 to 5 of 5

Thread: Accessing https and SSL

  1. #1

    Thread Starter
    Addicted Member flavorjatin's Avatar
    Join Date
    Sep 2001
    Location
    India
    Posts
    154

    Accessing https and SSL

    Hi All,

    1. I've created a function in which, using httpWebRequest, I am sending a request to a https site. Now, when i place this function in VB.NET Windows application project, it is able to give me the response successfully. But, when i place this function in a Web service, it gives error Could not establish secure channel for SSL/TLS (Probably, thats where SSL comes into picture, since I am accessing https site. But why this error does not come when I access it through windows application?)

    2. I need to send some sensitive data to the Web service I've created from my VB 6.0 client. Can SSL can help me doing the same or do I require to put some encryption logic in the place?

    Thanks in advance.
    Best Regards.

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    Show me how you did it in the windows forms version as some time ago i wanted to do the same and got stuck. Ty
    \m/\m/

  3. #3

    Thread Starter
    Addicted Member flavorjatin's Avatar
    Join Date
    Sep 2001
    Location
    India
    Posts
    154
    This is C# code

    string strRequestHTML;
    string strBaseURL = "https://www...?";

    strRequestHTML = "PARAMETERS";

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strBaseURL + strRequestHTML);

    request.Credentials = new NetworkCredential();

    HttpWebResponse response = (HttpWebResponse)request.GetResponse();

    XmlDocument doc = new XmlDocument();
    doc.Load(response.GetResponseStream());
    txtXMLResponse.Text = doc.InnerXml;
    response.Close();
    Best Regards.

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    My first guess is that the client certificate is located on your store, not the store that the web service is running under. I can't tell you much more beyond that, as I am hitting this issue this week.

  5. #5
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    Originally posted by flavorjatin
    This is C# code

    string strRequestHTML;
    string strBaseURL = "https://www...?";

    strRequestHTML = "PARAMETERS";

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(strBaseURL + strRequestHTML);

    request.Credentials = new NetworkCredential();

    HttpWebResponse response = (HttpWebResponse)request.GetResponse();

    XmlDocument doc = new XmlDocument();
    doc.Load(response.GetResponseStream());
    txtXMLResponse.Text = doc.InnerXml;
    response.Close();
    and what do you have here?
    Code:
    new NetworkCredential();
    \m/\m/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width