同上 ,我是先添加WEB引用,用URL 把WEB Service添加进来的,然后以下是调用代码:
private void Page_Load(object sender, System.EventArgs e)
{
net.webservicexx.Weather we=new _041102.net.webservicexx.Weather();
}
然后就出错: /// <res/>
行 30: public Weather() {
行 31: this.Url = "http://webservicexx.net/webservice/Weather.asmx";
行 32: } E:\asp.net项目\041102\Web References\net.webservicexx\Reference.cs 行: 30
private void Page_Load(object sender, System.EventArgs e)
{
net.webservicexx.Weather we=new _041102.net.webservicexx.Weather();
}
然后就出错: /// <res/>
行 30: public Weather() {
行 31: this.Url = "http://webservicexx.net/webservice/Weather.asmx";
行 32: } E:\asp.net项目\041102\Web References\net.webservicexx\Reference.cs 行: 30
解决方案 »
- 简单的SQL语句问题
- javasrcipt
- xml怎么取父结点
- 安装VS2005总是出错,要么是出现代号为2705的错误,要么干脆蓝屏,该怎么解决?
- 求助! 关于Asp.net 站点地图程序异常
- 事务在触发器中结束。批处理已中止。
- 有兩個DataGrid控件,一個爲Grid1,一個爲Grid2;要實現在Grid1上移動行時改變行的背景色,改變的同時也要改變Grid2行相應行的背景色。(
- 求iewebcontrol和xml结合使用的方法??
- 急急急急急急急急急急急急急急急急急急急急急急急,从早上到现在就为这个问题?快死人了呀。
- fckeditor在做扩展的时候需要获取选中内容的html,如何获取?
- 求新闻文章系统的源代码,asp.net(C#) sql server,带源代码
- 通过URL传递参数时单词大小写混用好还是全部小写好?
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;namespace _041204
{
/// <summary>
/// Service1 的摘要说明。
/// </summary>
public class Service1 : System.Web.Services.WebService
{
public Service1()
{
//CODEGEN: 该调用是 ASP.NET Web 服务设计器所必需的
InitializeComponent();
} #region 组件设计器生成的代码
//Web 服务设计器所必需的
private IContainer components = null;
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
} /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#endregion // WEB 服务示例
// HelloWorld() 示例服务返回字符串 Hello World
// 若要生成,请取消注释下列行,然后保存并生成项目
// 若要测试此 Web 服务,请按 F5 键 [WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
按了F5后 就提示不能运行!!!! 什么原因