Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface IService1 : MyExternalService
- public class Service1 : IService1
- {
- public string GetData(int value)
- {
- return string.Format("You entered: {0}", value);
- }
- public string ExternalMethod1(string a, string b)
- {
- throw new NotImplementedException();
- }
- //etc
- <configuration>
- <appSettings>
- <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
- </appSettings>
- <system.web>
- <compilation debug="true" targetFramework="4.5" />
- <httpRuntime targetFramework="4.5"/>
- </system.web>
- <system.serviceModel>
- <bindings>
- <wsHttpBinding>
- <binding name="WSHttpBinding_IExternalService">
- <security>
- <message clientCredentialType="Certificate" />
- </security>
- </binding>
- <binding name="WSHttpBinding_IExternalService1">
- <security>
- <message clientCredentialType="Certificate" negotiateServiceCredential="false"
- algorithmSuite="Basic128" establishSecurityContext="false" />
- </security>
- </binding>
- </wsHttpBinding>
- </bindings>
- <client>
- <endpoint address="http://service.com/ExternalService/ExternalService.svc"
- binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IExternalService"
- contract="ExternalService.IExternalService" name="WSHttpBinding_IExternalService">
- <identity>
- <dns value="service.com" />
- </identity>
- </endpoint>
- <endpoint address="http://service.com/ExternalService/ExternalService.svc/Java"
- binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IExternalService1"
- contract="ExternalService.IExternalService" name="WSHttpBinding_IExternalService1">
- <identity>
- <dns value="service.com" />
- </identity>
- </endpoint>
- </client>
- <behaviors>
- <serviceBehaviors>
- <behavior>
- <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
- <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
- <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
- <serviceDebug includeExceptionDetailInFaults="false"/>
- </behavior>
- </serviceBehaviors>
- </behaviors>
- <protocolMapping>
- <add binding="basicHttpsBinding" scheme="https" />
- </protocolMapping>
- <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
- </system.serviceModel>
- <system.webServer>
- <modules runAllManagedModulesForAllRequests="true"/>
- <!--
- To browse web app root directory during debugging, set the value below to true.
- Set to false before deployment to avoid disclosing web app folder information.
- -->
- <directoryBrowse enabled="true"/>
- </system.webServer>
- </configuration>
- <services>
- <service name="MyService.MyService" behaviorConfiguration="metadataBehavior">
- <endpoint
- address="http://localhost/MyService.svc"
- binding="customBinding" bindingConfiguration="jsonpBinding"
- behaviorConfiguration="MyService.MyService"
- contract="MyService.IMyService"/>
- <endpoint
- address="mex"
- binding="mexHttpBinding"
- contract="IMetadataExchange"/>
- </service>
- </services>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement