Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Contract requires Session, but Binding ‘WSHttpBinding’ doesn’t support it or isn’t configured properly to support it
- [ServiceContract(SessionMode = SessionMode.Required)]
- public interface ITicketSales
- {
- }
- [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single)]
- public class TicketSalesService : ITicketSales
- {
- }
- <system.serviceModel>
- <services>
- <service name="InternetRailwayTicketSales.TicketSalesImplementations.TicketSalesService" behaviorConfiguration="defaultBehavior">
- <host>
- <baseAddresses>
- <add baseAddress = "https://localhost/TicketSales/"></add>
- </baseAddresses>
- </host>
- <endpoint address="MainService" binding="wsHttpBinding" bindingConfiguration="wsSecureConfiguration"
- contract="InternetRailwayTicketSales.TicketSalesInterface.ITicketSales" />
- <endpoint address="mex" binding="mexHttpsBinding"
- contract="IMetadataExchange"/>
- </service>
- </services>
- <bindings>
- <wsHttpBinding>
- <binding name="wsSecureConfiguration">
- <security mode="Transport">
- <transport clientCredentialType="None"></transport>
- </security>
- </binding>
- </wsHttpBinding>
- </bindings>
- <behaviors>
- <serviceBehaviors>
- <behavior name="defaultBehavior">
- <serviceThrottling maxConcurrentInstances="5000" maxConcurrentSessions="5000"/>
- <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
- <serviceDebug includeExceptionDetailInFaults="True" />
- </behavior>
- </serviceBehaviors>
- </behaviors>
- <binding name="wsHttpSecureSession">
- <security>
- <message establishSecurityContext="true"/>
- </security>
- </binding>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement