Web请求中的asp.net错误 [英] asp.net error in web request

查看:79
本文介绍了Web请求中的asp.net错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在将一个网站集成到另一个网站中我使用此代码

Hello ,
I am integrating one website to another website in this i use this code

Uri myUri = new Uri(strURL, UriKind.Absolute);
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(myUri);       
//WebRequest webRequest = WebRequest.Create(myUri);
webRequest.Timeout = Timeout.Infinite;
webRequest.KeepAlive = true;
HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();
Stream st = (Stream)response.GetResponseStream();
StreamReader readstream = new StreamReader(st);
string datastring = readstream.ReadToEnd();
response.Close();
st.Close();
readstream.Close();
Response.Write(datastring);
OpenNewWindow(strURL);



此代码在我的服务器中正常工作,但在此行中的另一台服务器上显示错误


this code is working properly in my server but it showing an error on another server in this line

HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();



屏幕截图错误在链接中

http://postimg.org/image/j6lifhkel/ [ ^ ]



请回复



谢谢&问候

Srishti


screen shot of error is in link
http://postimg.org/image/j6lifhkel/[^]

Please reply

Thanks & Regards
Srishti

推荐答案

您似乎已在Intranet服务器上部署了Web应用程序。如果您可以远程访问服务器,请登录服务器并验证服务器是否具有Internet连接。
It seems that you have deployed your web application on an intranet server. If you have remote access to the server, log in to the server and verify that the server has internet connection.


这篇关于Web请求中的asp.net错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆