ทำ Web Service รัน WCF + jQeury คือสามารถรันได้เลย
1) สร้าง Project ใหม่เป็น Web ASP.NET Empty หลังจากนั้น Add new item LINGQ to SQL Class แล้วลาก Table มาวาง 2) ทำการ Add new item -> WCF Service แล้วจะได้ไฟล์ service1.svc แก้โคดตามนี้ using…
ทำ WindowsService ให้รันออโต้บริการ Service
1) เริ่มแรกสร้างโปรเจ็คใหม่เป็น Windows Service Application (C#) และใส่โค้ดในหน้า Service1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; using System.ServiceModel; using System.ServiceModel.Web;…
การทำ Web service ด้วย WCF + Restful + Json PART II
ต่อจากของเดิม http://kungtee.rmutp.ac.th/index.php/wcf-restful-json/ ต่อจากครั้งที่แล้วทำ table และปุ่ม <!doctype html> <html lang="en"> <head> <script type="text/javascript" src="jquery-1.7.1.min.js"></script> <script type="text/javascript" src="myscript.js"></script> </head> <body> <input type="text" id="hello" value="" /><br/> <input type="text" id="studentid" value="" /><input type="button" id="submit"…
การทำ Web service ด้วย WCF + Restful + Json
WCF จะสามารถบริการ Web service ได้ทั้ง windows application กับ web application 1) open visual studio 2012 2) new project windows application form 3) add reference 4) code behide 5) สร้าง Service1…