Since my site uses ssl certificate, I can no longer access an xml file from my server. Please help me.
I have 4 files from ZeroSSL page: account-key.txt; (RSA PRIVATE KEY) domain-csr.txt; (CRT) (CABUNDLE) 2OmkvG1CfXtJ-sYpp5mV0......; (File without extension) qGGRddmOl62soMPdlCBeamnR......; (File without extension)
The url now start with https, my current code is:
string currentVersion = GetWebPage("http://sofobot.com/version.xml");
XmlDocument VersionInfo = new XmlDocument();
VersionInfo.LoadXml(currentVersion);
.
.
public static string GetWebPage(string URL)
{
System.Net.HttpWebRequest Request = (HttpWebRequest)(WebRequest.Create(new Uri(URL)));
Request.Method = "GET";
Request.MaximumAutomaticRedirections = 4;
Request.MaximumResponseHeadersLength = 4;
Request.ContentLength = 0;
StreamReader ReadStream = null;
HttpWebResponse Response = null;
string ResponseText = string.Empty;
Response = (HttpWebResponse)(Request.GetResponse());
Stream ReceiveStream = Response.GetResponseStream();
ReadStream = new StreamReader(ReceiveStream, System.Text.Encoding.UTF8);
ResponseText = ReadStream.ReadToEnd();
Response.Close();
ReadStream.Close();
return ResponseText;
}
Error InnerException -> stacktrace:
en System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) en System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) en System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) en System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) en System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) en System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) en System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) en System.Net.ConnectStream.WriteHeaders(Boolean async)