dcsimg
Results 1 to 7 of 7
  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    251

    URLDownloadToFile and sll Sites download on Windows Server 2012

    Hello Group,

    Looking for some guidance. I use URLDownloadToFile to download files from my server for application updates. I recently had to get an SSL cert for my site and it appears that on windows server 2012 the URLDownloadToFile function does not work. It will not download the file. I tried it on Windows 10 and 7 and they both work with the https fowarded path.

    But on windows server 2012 downloading from https: forwarded paths, it does not work.

    Any insight would be appreciated.

  2. #2
    Member
    Join Date
    Mar 2018
    Posts
    56

    Re: URLDownloadToFile and sll Sites download on Windows Server 2012

    probably a stupid question but have you verified that you can download the file via a browser?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    251

    Re: URLDownloadToFile and sll Sites download on Windows Server 2012

    Quote Originally Posted by DllHell View Post
    probably a stupid question but have you verified that you can download the file via a browser?
    the file will download via URLDownloadToFile if I switch to non-https path

    As soon as I turn fowarding on to https site via the .htaccess file on the server the urldownloadtofile stops working

    Yes I just tried it on a browser on the 2012 server and both http and https works

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    251

    Re: URLDownloadToFile and sll Sites download on Windows Server 2012

    In case anyone else runs into this. I changed how I get the files from using URLDownloadToFile to using to using:

    Code:
    Public Sub downloadTheFile(TheFile As String, aSynch As Boolean)
      
        ' Create the WinHTTPRequest ActiveX Object.
        Set http = New WinHttpRequest
        ''set to ignore certificate warnings
        http.Option(WinHttpRequestOption_SslErrorIgnoreFlags) = &H3300
        ' Open an HTTP connection.
        http.Open "GET", TheFile, aSynch  'True means asynch.
        ' Send the HTTP Request.
        http.send
        
    End Sub
    Basically I needed the ability to bypass certificate warnings that appear only in Windows Server 2012.

  5. #5
    Fanatic Member wqweto's Avatar
    Join Date
    May 2011
    Posts
    566

    Re: URLDownloadToFile and sll Sites download on Windows Server 2012

    Did you try settings HKLM\SOFTWARE\Policies\Microsoft\SystemCertificates\AuthRoot\DisableRootAutoUpdate to 0 on the affected server?

    Seems like some unfortunate patch from MS (that was later revoked?) switched off root certificates' auto-update on most Server editions in an effort for admins to better control what the OS is downloading from the internet. For non-paranoid folks like us this seems like a major PITA IMO.

    cheers,
    </wqw>

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    251

    Re: URLDownloadToFile and sll Sites download on Windows Server 2012

    Quote Originally Posted by wqweto View Post
    Did you try settings HKLM\SOFTWARE\Policies\Microsoft\SystemCertificates\AuthRoot\DisableRootAutoUpdate to 0 on the affected server?

    Seems like some unfortunate patch from MS (that was later revoked?) switched off root certificates' auto-update on most Server editions in an effort for admins to better control what the OS is downloading from the internet. For non-paranoid folks like us this seems like a major PITA IMO.

    cheers,
    </wqw>
    YEs I had thought of that, but my software is pro-sumer based and I would not be able to make that a requirement. It all just has to work in all possible situations.

    So just to clarify, how is this patch removed? The server was fully updated and still had the issue. Do you have a KB to reference? Does this mean future versions of 2012 don't have this issue?

  7. #7
    Fanatic Member wqweto's Avatar
    Join Date
    May 2011
    Posts
    566

    Re: URLDownloadToFile and sll Sites download on Windows Server 2012

    https://cloudblogs.microsoft.com/win...indows-server/

    I have couple of fully patched 2012 R2/2016 servers w/ no Root CA problems while browsing with Edge/IE

    Don't have a stock 2012 handy to check if your problem is endemic or just unfortunate (rogue) patch timing.

    cheers,
    </wqw>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width


×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.