//注意
在1.1的machine.config,默认webservice去除了post,get方法
machine.config中找到把去掉的加上
1,webservice
[WebMethod]
public string GetMessage()
{
XmlDocument doc=new XmlDocument();
doc.Load(Server.MapPath(".")+"/test.xml");
string rtn=doc.OuterXml;
doc=null;
return rtn;
}
2,aspx中调用
[WebMethod]
public string GetMessage()
{
XmlDocument doc=new XmlDocument();
doc.Load(Server.MapPath(".")+"/test.xml");
string rtn=doc.OuterXml;
doc=null;
return rtn;
}
2,aspx中调用
博客主要讲述在1.1的machine.config中,默认WebService去除了post、get方法,需将去掉的加上。还给出了WebService获取XML内容的代码示例,以及在aspx中调用的相关信息。
1349

被折叠的 条评论
为什么被折叠?



