Hello,
I am having a weird issue when implementing code (VB) behind one of my Infopath 2010 forms, that I use in Browser mode for SharePoint 2010. The form that I made takes purchase information such as Credit Card CID# and other things, and then sends that information using a post to our Authorizer. The form has been working fine until Production day and after making a few cosmetic changes such as color or font size. I re-published and I get a error upon submit(Onclick within my code). Now I have seen the error before, but I am sure you would be surprised when I said over night it fixed itself. Well this time around it didn't and so I started debugging and commenting out code to see when the form would spit the error. I found that it would right at this block of code below.
' post data is sent as a stream
Dim myWriter As StreamWriter = Nothing
myWriter =
New StreamWriter(objRequest.GetRequestStream())
myWriter.Write(post_string)
myWriter.Close()
Also here is the error that comes up in the Event Viewer:
Exception Message: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure.
Any help to this would be appreciated.
Thank You,
Brandon
Update:
The exact line of code where the Error comes from is below:
myWriter =
New StreamWriter(objRequest.GetRequestStream())
And the objrequest comes from this block.
' Create HTTPWeb Request to Communicate with Authorize.Net
Dim objRequest As HttpWebRequest = CType(WebRequest.Create(post_url), HttpWebRequest)
objRequest.Method="POST"
objRequest.ContentLength = post_string.Length
objRequest.ContentType =
"application/x-www-form-urlencoded"
Thanks