asp.net实现天气接口 报错 远程服务器返回错误: (500) 内部服务器错误。

问题描述

asp.net实现天气接口 报错 远程服务器返回错误: (500) 内部服务器错误。

string str = client.DownloadString("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getWeatherbyCityName?theCityName=57494");

[WebException: 远程服务器返回错误: (500) 内部服务器错误。]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +283
System.Net.WebClient.DownloadString(Uri address) +100
System.Net.WebClient.DownloadString(String address) +29
weather.Bnn_Weather.Get_3day_weather(String CityName) in d:专业操作信息库WPFweatherweatherBnn_Weather.cs:52
weather.WeatherWeb.disp_weather(String city) in d:专业操作信息库WPFweatherweatherWeatherWeb.aspx.cs:56
weather.WeatherWeb.Button1_Click(Object sender, EventArgs e) in d:专业操作信息库WPFweatherweatherWeatherWeb.aspx.cs:64
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9628722
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

解决方案

远程服务器返回错误: (500) 内部服务器错误
HttpWebResponse远程服务器返回错误: (500) 内部服务器错误。
远程服务器返回错误: (500) 内部服务器错误解决办法

解决方案二:

服务器内部处理有问题。查看服务器对应API的代码

时间: 2024-09-06 23:00:22

asp.net实现天气接口 报错 远程服务器返回错误: (500) 内部服务器错误。的相关文章

实现天气接口报错-实现天气,报错远程服务器返回错误: (500) 内部服务器错误。

问题描述 实现天气,报错远程服务器返回错误: (500) 内部服务器错误. /// /// CityName为用户当前要查寻的城市名称 /// 本方法返回一个数据组 /// CityPhoto.ImageUrl = "http://www.cma.gov.cn/tqyb/img/city/" + list[3]; //这里的list[3]是城市的图片 /// lsit[0] 所属省 /// list[1] 城市 /// list[2] 城市编号 /// list[3] 图片 /// l

远程服务器返回错误: (500) 内部服务器

问题描述 在.net中发送xmlpost请求和接受xml的post请求时,遇到"远程服务器返回错误:(500)内部服务器错误".我在post请求的方法加入"text/xml"也不行求大神指教post的方法如下:stringGetResponse(stringurl,stringparam,stringMethod){byte[]postData=Encoding.UTF8.GetBytes(param);HttpWebRequestreq=(HttpWebReque

C#控制台消息模拟发送,提示远程服务器返回错误: (500) 内部服务器错误。

问题描述 求指导哪里出的错 解决方案 解决方案二:去服务器上看日志呀解决方案三:500就是程序报错了,这个谁知道到底什么问题呢?不过看你有<>,估计是不安全报错了吧解决方案四:不安全报错是什么错?

WCF远程服务器返回错误: (500) 内部服务器错误。

问题描述 {"响应消息的内容类型text/html;charset=utf-8与绑定(application/soap+xml;charset=utf-8)的内容类型不匹配.如果使用自定义编码器,请确保正确实现IsContentTypeSupported方法.响应的前1024个字节为:"<html>rn<head>rn<title>配置错误</title>rn<style>rnbody{font-family:"Ve

远程服务器返回错误500 内部服务器错误

问题描述 两次链接服务器上面的成功了,服务器代码也执行了,但是下面的uploadvalues却一直出现异常,到底是怎么回事回事,不管是链接server.aspx还是savegoods.sapx都同样发生异常,用别的客户端测试链接这两个.aspx都没有问题,到底是怎么回事,搞了好久了,一直搞不懂,求大神解惑.服务端代码如下protectedvoidPage_Load(objectsender,EventArgse){strings=Request.Form["QQ"];Response.

.net-.NET调JAVA的webservice接口报错是怎么回事?

问题描述 .NET调JAVA的webservice接口报错是怎么回事? webservice可访问,已访问到接口方法,参数和返回值都是string类型的.就是最后执行该方法时报错"Fault occurred while processing". 无论静态添加web引用或服务引用,还是代码动态添加,都是一样的错.动态调用是在最后invoke时报错.是怎么回事?怎么改?求大神帮忙~~

web服务-app 调用webservice的图片上传接口报错

问题描述 app 调用webservice的图片上传接口报错 以下为c#写的图片上传接口,图片是在app转为base64的:而当在服务上测试时是可以上传,即下图的位置 可是在app调用该接口时却出错,这是为什么,困扰了多天了.请大神帮忙哈 public JObject UploadPicture(string jsonString) { JToken Picture; JObject jobject = JObject.Parse(jsonString); Picture = jobject.G

querystring-在httpclient中使用Serializable接口报错

问题描述 在httpclient中使用Serializable接口报错 public static void main(String[] args) throws IOException ClassNotFoundException { String url = ""http://localhost:8080/RmiJetty/test""; Scanner sc1 = new Scanner(System.in); String queryString1 = &q

jar-weblogic环境下调用接口报错,急,在线等!org.w3c.dom.Node.setUserData

问题描述 weblogic环境下调用接口报错,急,在线等!org.w3c.dom.Node.setUserData 之前在测试环境中测试是可以的,后来部署到正式环境就挂掉了,tomcat下也是正常的.项目的weblogic.xml也配置了优先加载项目的jar包,还是不行. ava.lang.LinkageError: loader constraint violation: when resolving interface method "org.w3c.dom.Node.setUserData