Executing web method from ASP.NET using SSL cert fails

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MarkoH

    Executing web method from ASP.NET using SSL cert fails

    When trying to execute a web method from ASP.NET page if fails producing
    error:

    [Win32Exception (0x80004005): The message received was unexpected or badly
    formatted]

    [WebException: The underlying connection was closed: Could not establish
    secure channel for SSL/TLS.]
    System.Net.Http WebRequest.Chec kFinalStatus()
    System.Net.Http WebRequest.EndG etRequestStream (IAsyncResult asyncResult)
    System.Net.Http WebRequest.GetR equestStream()
    .....

    The same code works perfectly from console app. I have attached the X.509
    certificate which is valid for this web service through the usage of
    ClientCertifica tes.Add(). I noticed in MSDN docs that app needs to have
    rights on the certificate file. Which account specificaly is meant by that?
    I have added Everyone and ASPNET accounts full rights on that folder for
    testing purposes. The same error is still here.

    What else could be wrong here? Why does it work from console app but not
    from ASP.NET web app?

    Thank you,
    Marko


Working...