HTML Include Macro auth headers

Brad Schoening November 12, 2014

The HTML Inclue  Macro is enabled in our confluence server instance and the URL we wish to use been whitelisted.  However, the macro fails with 'Page not permitted.'

The URL is an internal link, somethink like:

http://jobs.example.com:9191/cgi-bin/qsp.cgi/tests?category=Rate

Next, I checked if I could fetch the URL using PowerShell's WebClient.  That failed intially with the error ""The remote server returned an error: (401) Unauthorized."   Apparently, .NET webservers require authentication headers on non default ports like 9191.  When I specified UseDefaultCredentials, it worked in PowerShell.

The powershell script looks like:

$client = new-object System.Net.WebClient 
$client.UseDefaultCredentials = $True 
$url = http://jobs.example.com:9191/cgi-bin/qsp.cgi/tests?category=Rates
$client.DownloadFile( $url, "H:\temp\out.html")


It still won't work in the HTML Include Macro.  Are auth headers sent by the macro? 

 

1 answer

0 votes
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2014

"Apparently, .NET webservers require authentication headers on non default ports like 9191."

No, that's not really true. You probably don't have anonymous access enabled for that site in IIS.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events