G
gg edm
Guest
public string getWebResponse(string address)
{
System.Net.WebResponse webResponse = null;
System.Net.SecurityProtocolType SecurityProtocol = new System.Net.SecurityProtocolType();
System.Net.WebRequest webRequest = System.Net.WebRequest.Create(address);
//if (address.StartsWith("https", StringComparison.InvariantCultureIgnoreCase))
// GetUriCookieContainer(webRequest.RequestUri);
//else
//webRequest.Credentials = System.Net.CredentialCache.DefaultCredentials; // if needed by server
try
{
webResponse = webRequest.GetResponse();
}
catch (Exception ex) { MessageBox.Show(this, ex.Message, "getWebResponse - webRequest.GetResponse() error"); }
how do I set the System.Net.SecurityProtocol for the webrequest?
Continue reading...
{
System.Net.WebResponse webResponse = null;
System.Net.SecurityProtocolType SecurityProtocol = new System.Net.SecurityProtocolType();
System.Net.WebRequest webRequest = System.Net.WebRequest.Create(address);
//if (address.StartsWith("https", StringComparison.InvariantCultureIgnoreCase))
// GetUriCookieContainer(webRequest.RequestUri);
//else
//webRequest.Credentials = System.Net.CredentialCache.DefaultCredentials; // if needed by server
try
{
webResponse = webRequest.GetResponse();
}
catch (Exception ex) { MessageBox.Show(this, ex.Message, "getWebResponse - webRequest.GetResponse() error"); }
how do I set the System.Net.SecurityProtocol for the webrequest?
Continue reading...