Thursday, October 1, 2015

Exposing WCF REST Service over BasicAuthentication

<system.serviceModel>
  <behaviors>
      <serviceBehaviors>
        <behavior name="MyServiceServiceBehavior">
          <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        
        </behavior>
     
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="jsonBehaviour">
          <webHttp automaticFormatSelectionEnabled="true"/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
<bindings>
    <webHttpBinding>
        <binding name="BasicAuthentication">
            <security mode="TransportCredentialOnly">
                <transport clientCredentialType="Basic" />
            </security>
        </binding>
    </webHttpBinding>
</bindings>
    <services>
      <service name="Cadence.SP.COS.Services.QueryService" behaviorConfiguration="MyServiceServiceBehavior">
       <endpoint address="" bindingConfiguration="BasicAuthentication" binding="webHttpBinding" behaviorConfiguration="jsonBehaviour" contract="Cadence.SP.COS.Services.IQueryService">
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange">
        </endpoint>
      </service>
      </services>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />

  </system.serviceModel>


PowerShell script to delete file versions from the specified SharePoint document library

Managing file versions in SharePoint Online is essential to maintain storage hygiene and performance, especially when versioning is enabled ...