Advertisement
Guest User

Untitled

a guest
May 26th, 2012
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. Contract requires Session, but Binding ‘WSHttpBinding’ doesn’t support it or isn’t configured properly to support it
  2. [ServiceContract(SessionMode = SessionMode.Required)]
  3. public interface ITicketSales
  4. {
  5. }
  6.  
  7. [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single)]
  8. public class TicketSalesService : ITicketSales
  9. {
  10. }
  11.  
  12. <system.serviceModel>
  13. <services>
  14. <service name="InternetRailwayTicketSales.TicketSalesImplementations.TicketSalesService" behaviorConfiguration="defaultBehavior">
  15.  
  16. <host>
  17. <baseAddresses>
  18. <add baseAddress = "https://localhost/TicketSales/"></add>
  19. </baseAddresses>
  20. </host>
  21.  
  22. <endpoint address="MainService" binding="wsHttpBinding" bindingConfiguration="wsSecureConfiguration"
  23. contract="InternetRailwayTicketSales.TicketSalesInterface.ITicketSales" />
  24. <endpoint address="mex" binding="mexHttpsBinding"
  25. contract="IMetadataExchange"/>
  26. </service>
  27. </services>
  28.  
  29. <bindings>
  30. <wsHttpBinding>
  31. <binding name="wsSecureConfiguration">
  32. <security mode="Transport">
  33. <transport clientCredentialType="None"></transport>
  34. </security>
  35. </binding>
  36. </wsHttpBinding>
  37. </bindings>
  38.  
  39. <behaviors>
  40. <serviceBehaviors>
  41. <behavior name="defaultBehavior">
  42. <serviceThrottling maxConcurrentInstances="5000" maxConcurrentSessions="5000"/>
  43. <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
  44. <serviceDebug includeExceptionDetailInFaults="True" />
  45. </behavior>
  46. </serviceBehaviors>
  47. </behaviors>
  48.  
  49. <binding name="wsHttpSecureSession">
  50. <security>
  51. <message establishSecurityContext="true"/>
  52. </security>
  53. </binding>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement