Hello,
we are implemting an application that uses a https
connection
for accessing a website. It is also possible to connect
via http.
With http every thing works fine. With https it is not
possible
to connect to the web site. The tunnel is established
without
an error, but it seems that the Credentials are ignored,
because
the server generates a not authorised error. The following
peace
of code is used for the connection.
webreq = (HttpWebRequest)WebRequest.Create(sendstr);
webreq.Timeout = m_SocketTimeout;
webreq.Credentials = m_Credentials;
webreq.CookieContainer = new CookieContainer();
webreq.CookieContainer.Add(m_CookieCol);
webresp = (HttpWebResponse)webreq.GetResponse();
getstream = webresp.GetResponseStream();
sr = new StreamReader(getstream);
rc = sr.ReadToEnd();
If the above code is used via https the WebResponse
generates the
exception SecureChannelFailure.
Any help is wecome.
Thanks
Frank.