TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prabu Spark
NA
124
204.4k
could n't establish trust relationship for ssl/tls secure
Aug 16 2013 1:50 AM
Hi sir,
I am getting the below error, while hosting the website in webserver.
"the underlying connection was closed. could not establish trust relationship for the ssl/tls secure channel".
I attached the code for your refernce. Kindly give me the solution for this problem.
public string posted_data()
{
string urls="http://www.mydomain.com?uname=hi&password=123";
ASCIIEncoding encoding = new ASCIIEncoding();
Stream newStream;
string postData = "";
postData += (urls);
byte[] data = encoding.GetBytes(urls);
// Prepare web request...
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(urls);
myRequest.Method = "POST";
myRequest.Accept = "text/plain";
myRequest.ContentType = "application/x-www-form-urlencoded";
myRequest.ContentLength = data.Length;
newStream = myRequest.GetRequestStream();
// Send the data.
newStream.Write(data, 0, data.Length);
// grab the response
HttpWebResponse HttpWResp = (HttpWebResponse)myRequest.GetResponse();
Stream streamResponse = HttpWResp.GetResponseStream();
// And read it out
StreamReader reader = new StreamReader(streamResponse);
string response = reader.ReadToEnd();
newStream.Close();
return response;
}
Reply
Answers (
1
)
css for light green color?
Not saving in my database