Guest User

Untitled

a guest
Jul 17th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. [ServiceContract]
  2. public interface IService
  3. {
  4. [OperationContract]
  5. [WebGet(UriTemplate = "hello/?n={name}")]
  6. Message SayHello(string name);
  7. }
  8.  
  9. public Message SayHello(string name) {
  10. return Message.CreateMessage(MessageVersion.None, "*", "Hello "+name+"!");
  11. }
  12.  
  13. Failed to map the path '/rest'.
  14.  
  15. <?xml version="1.0"?>
  16. <configuration>
  17. <system.web>
  18. <compilation debug="true" targetFramework="4.0" />
  19. </system.web>
  20. <system.serviceModel>
  21. <behaviors>
  22. <serviceBehaviors>
  23. <behavior>
  24. <serviceMetadata httpGetEnabled="true"/>
  25. <serviceDebug includeExceptionDetailInFaults="false"/>
  26. </behavior>
  27. </serviceBehaviors>
  28. </behaviors>
  29. <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  30. </system.serviceModel>
  31. <system.webServer>
  32. <modules runAllManagedModulesForAllRequests="true"/>
  33. </system.webServer>
  34. </configuration>
Add Comment
Please, Sign In to add comment