首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >https抛出“找不到远程服务器”windows phone 7

https抛出“找不到远程服务器”windows phone 7
EN

Stack Overflow用户
提问于 2012-10-19 15:13:50
回答 1查看 238关注 0票数 0

我正在调用我们的服务器,它将检查用户的身份验证,如果是有效用户,它将返回会话ID。服务器的url是https...

我已经向server..It发出了httpwebrequest调用(和尝试过的webclient一样),工作正常,但最近服务器的证书已被续订,现在我无法访问服务器。它抛出一个异常服务器找不到...

下面是我的代码......

代码语言:javascript
复制
private void LoginRequest()
        {
            try
            {

         var httpLoginRequest = (HttpWebRequest)WebRequest.Create(new Uri("https:xxxxx"                             + "?" +"username=" + UserName_textBox.Text + "&" + "password="+ Password_textBox.Password));
                httpLoginRequest.Method = DisplayMessage.Get_Method;
                Parameters = new Dictionary<string, string>();
                httpLoginRequest.BeginGetResponse(new AsyncCallback(GetLoginCallback), httpLoginRequest);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void GetLoginCallback(IAsyncResult asynchronousResult)
        {
            try
            {
               HttpWebRequest httpRequest = HttpWebRequest)asynchronousResult.AsyncState;
               HttpWebResponse httpresponse = (HttpWebResponse)httpRequest.EndGetResponse(asynchronousResult);
                Stream streamResponse = httpresponse.GetResponseStream();
                using(StreamReader streamRead = new StreamReader(streamResponse))
                {
                    var response = streamRead.ReadToEnd(); 
                }
         }
catch(WebException ex){}}

我参考了很多论坛,但似乎没有用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-10-23 15:44:29

出现此问题是因为服务器证书已更改.....因此,我需要手动安装ssl证书...我通过在移动浏览器中通过邮件下载ssl证书url作为附件并安装它来实现这一点。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12969168

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档