Ever wondered if it is possible to add custom sources to a SCCM based Microsoft Connected Cache? It is absolutely possible as long as we talk about HTTP and not HTTPS, we can simply add the additional Server URL as a ServerFarm to IIS and add the needed URL Rewrite Rule
Lets start with the Server Farm, in IIS under Server Farms create a new Farm, in my case a Azure Blob Storage:
Once the Farm is created, we need to modify a few settings to have it the same as for the Built-in farms, first under Caching, set the duration from 60s to 600s
Then under Proxy, increase the Time-out from 30s to 300s
Last but not least disable the URL Rewrite under Routing Rules, as we will create a custom URL Rewrite Rule afterwards
To create the Rewrite Rule we select the Default Web Site and select URL Rewrite
and select Blank Inbound rule
In the Rule we give it a Name to recognise to which Server Farm it should redirect and select the Pattern .* as Match URL
In the next Section Conditions, we will tell the IIS how to identify our server as Query String in the following Pattern
cacheHostOrigin=(.*[.])?(playgroundbulintune.blob.core.windows.net)
Next we need to add the Server Variables for the Server Name (HTTP_HOST) and the Connected Cache Variable.
The last needed modifications, are the Rewrite URL that points to the newly created ServerFarm and the Checkbox to Stop processing of subsequent rules. The Rewrite URL in my example looks like this:
http://Farm_playgroundbulintune.blob.core.windows.net_E77D08D0-5FEA-4315-8C95-10D359D59294/{R:0}
Leave a Reply