Skip to content

Instantly share code, notes, and snippets.

View ashic's full-sized avatar

Ashic Mahtab ashic

View GitHub Profile
namespace Syndication.Client.Http
{
public class CachingAdapter : HttpClientAdapter
{
readonly HttpClient client;
public CachingAdapter(ICacheStore cacheStore, string[] defaultVaryHeaders)
{
//http://msdn.microsoft.com/en-us/library/system.net.cache.requestcachelevel(v=vs.110).aspx
//http://blog.technovert.com/2013/01/httpclient-caching/
# Enable TCP - Must be run from SQL powershell
$MachineObject = new-object ('Microsoft.SqlServer.Management.Smo.WMI.ManagedComputer') .
$ProtocolUri = "ManagedComputer[@Name='" + (get-item env:\computername).Value + "']/ServerInstance[@Name='MSSQLSERVER']/ServerProtocol"
$tcp = $MachineObject.getsmoobject($ProtocolUri + "[@Name='Tcp']")
Write-Host "TCP current => $tcp.IsEnabled" -ForegroundColor Green
$tcp.IsEnabled = $true
$tcp.alter()