Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. [WebService(Namespace="http://kennyw.com/sampleservices/")]
  2. public class MyService : System.Web.Services.WebService
  3. {
  4. [WebMethod]
  5. public string Hello(string name)
  6. {
  7. return string.Format(“Hello {0}.”, name);
  8.  
  9. }
  10.  
  11. }
  12.  
  13. [ServiceContract(Namespace="http://kennyw.com/WCFservices/")]
  14. [WebService(Namespace="http://kennyw.com/sampleservices/")]
  15. public class MyService : System.Web.Services.WebService
  16. {
  17. [WebMethod]
  18. [OperationContract]
  19. public string Hello(string name)
  20. {
  21. return string.Format(“Hello {0}.”, name);
  22.  
  23. }
  24.  
  25. }
  26.  
  27. namespace Foo
  28. {
  29. [ServiceContract(Namespace="http://kennyw.com/WCFservices/")]
  30. [WebService(Namespace="http://kennyw.com/sampleservices/")]
  31. public class MyService : System.Web.Services.WebService
  32. {
  33. [WebMethod]
  34. [OperationContract]
  35. public string Hello(string name)
  36. {
  37. return string.Format(“Hello {0}.”, name);
  38.  
  39. }
  40. }
  41. }
  42.  
  43. <services>
  44. <service name="YourServiceName">
  45. <endpoint address="" behaviorConfiguration="httpBehavior" binding="webHttpBinding" contract="Foo.MyService"/>
  46. </service>
  47. </services>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement