2011年7月1日 星期五

[WCF] Notes on Web Service using WCF

Create an empty Web Service
  1. Open Visual Studio 2008.
  2. Create new project: Visual C# WCF Service Application.
  3. Press [F5] to start debugging. It should be OK.

Remove default namespace
  1. In IService1.cs and Service1.svc.cs, remove "[Namespace]." string.
  2. In Service1.svc, remove "[Namespace]." string.
  3. In Web.config, remove "[Namespace]." string.
  4. Press [F5] to start debugging. It should be OK.

Rename IService1 interface
  1. Rename IService1.cs to "[NewServiceInterface].cs"
  2. In Service1.svc.cs and [NewServiceInterface].cs, rename IService1 to [NewServiceInterface].
  3. In Web.config, rename IService1 to [NewServiceInterface].
  4. Press [F5] to start debugging. It should be OK.

Rename Service1 implementation
  1. Rename Service1.svc to "[NewService].svc"
  2. In [NewService].svc, rename Service1 to [NewService]
  3. In [NewService].svc.cs, rename Service1 to [NewService]
  4. In Web.config, rename Service1 to [NewService].
  5. Press [F5] to start debugging. It should be OK.

沒有留言:

張貼留言