.NET C# ????WebService???????????
???????????? ???????[ 2015/7/7 14:03:07 ] ??????????????????? .NET
????Web service?????????????web????ó?????????????????????????ó?????????web????
????WebService???????????????
????1.???XML?????????????????????????????????
????2.?????????????XML???????????????????????????XML???????????????????簲???IOS??WindowsPhone???????????Web service???????????
????3.????HTTPЭ?飬????????????????????
???????????Visual Studio 2013??????VS?汾???????????????????Web service????
?????????Visual Studio->???->???->???
??????????????ASP.NET???????????“???”
???????????????????????????????????п??????web.config??????????????????????????????????????WebService???????á?????????????????е????????????WebService?????
????????????????????????????Web????(ASMX)?????????
?????塢?????????APP_Code??????д??????WebService.cs???
?????????????????????????WebService.asmx???
???????????????WebService.cs????????????WebService.asmx?????????????????WebService??????????????WebService.asmx?????????WebService???????????в?????WebService.cs???
?????????WebService.cs?????????????????????????????????web????????????????????????????????????????????????
1 /*
2 Web.Services.cs???
3 */
4 using System;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Web;
8 using System.Web.Services;
9
10 /// <summary>
11 /// WebService ???????
12 /// </summary>
13 [WebService(Namespace = "http://tempuri.org/")]
14 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
15 // ?????????? ASP.NET AJAX ?????е???? Web ?????????????????С?
16 // [System.Web.Script.Services.ScriptService]
17 public class WebService : System.Web.Services.WebService {
18
19 public WebService () {
20
21 //?????????????????????????????
22 //InitializeComponent();
23 }
24
25 /// <summary>
26 /// ?????????[WebMethod]?????????web???????????????д????????????????ò??????????????????????[WebMethod]
27 /// ????????????????????з?????????????????????????????????????????????[WebMethod]
28 /// </summary>
29 /// <param name="a"></param>
30 /// <param name="b"></param>
31 /// <returns>??????????????????????</returns>
32 [WebMethod]
33 public string HelloWorld(int a?? int b) {
34 int result = a + b;
35 return result.ToString();
36 }
37 }
????????????д?????????????????????????cs???????????????web?????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11